VisionEngine Library

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
danielmaximiliano
Posts: 2716
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

VisionEngine Library

Post by danielmaximiliano »

Hola a todos:
En base a una libreria que esta en GitHub de libre uso y en mis tiempo libres me propuse implementar el uso de una simple WEBCAM con el otro proyecto llamado Zbar.

Hello everyone: based on a library that is on GitHub for free use and in my free time I decided to implement the use of a simple WEBCAM with the other project called Zbar.

Links:
https://github.com/sipsorcery/mediafoun ... pleGrabber
https://linuxtv.org/downloads/zbar/bina ... 64-VfW.zip

despues de muchos dias luchando con Gemini porque ya tenia el SampleGrabber integrado y exportado todas sus funciones
seguia sin tener la imagen dentro del formulario HMG.

Leyendo foros encuentro que MF (Media Fundacion) no genera Ventana de video,
por eso no tenia video.. Basandome en foros y la ayuda de ChatGPT resumi SampleGrabber.cpp, SampleGrabber.h en VisionEngine.cpp
una libreria que comparto con uds para integarlo en cualquier proyecto.

After struggling for days because I already had the SampleGrabber integrated and all its functions exported, I still couldn't get the image to appear inside the HMG form.
While researching various forums, I discovered that Media Foundation (MF) does not automatically generate a video window, which is why the video wasn't rendering.

Based on forum discussions and some AI assistance, I refactored and consolidated SampleGrabber.cpp and SampleGrabber.h into a single library called VisionEngine.cpp. I am sharing this library with the community so it can be easily integrated into any project.

Rar ------------------------>
VisionEngine.rar
(1.91 MiB) Downloaded 34 times
Sin título.png
Sin título.png (21 KiB) Viewed 394 times
-Compilation-
Command line :

Code: Select all

cd c:\VisionEngine\Source
Command line :

Code: Select all

set path=%path%;c:\mingw64\bin
Command line :

Code: Select all

BuildLib
- Result -
Compilando VisionEngine... | Compiling VisionEngine...
Generando Librería... | Generating Library...
Verificando exports Harbour... | Verifying Harbour exports...
00000000000010e0 T HB_FUN_SCAN_CLEAR_RESULT
0000000000001270 T HB_FUN_SCAN_CLEARBUFFERDIRTY
0000000000001240 T HB_FUN_SCAN_CLEARBUFFERFLAG
0000000000001410 T HB_FUN_SCAN_COUNTDEVICE
00000000000010c0 T HB_FUN_SCAN_GETBARCODE
0000000000001150 T HB_FUN_SCAN_GETBUFFER
0000000000001280 T HB_FUN_SCAN_GETDEVICENAME
00000000000010d0 T HB_FUN_SCAN_GETTYPE
00000000000010b0 T HB_FUN_SCAN_IS_ACTIVE
0000000000001250 T HB_FUN_SCAN_ISBUFFERDIRTY
0000000000001120 T HB_FUN_SCAN_SETMODE
00000000000025b0 T HB_FUN_SCAN_SNAPSHOT
0000000000001070 T HB_FUN_SCAN_START
0000000000001090 T HB_FUN_SCAN_STOP
0000000000001400 T HB_FUN_VISION_GET_VERSION
0000000000001060 T HB_FUN_VISION_IS_RUNNING
0000000000001040 T HB_FUN_VISION_SETPREVIEWWINDOW
0000000000000ff0 T HB_FUN_VISION_START
0000000000001020 T HB_FUN_VISION_STOP
LISTO | DONE
ya sabes usar el IDE asi que abres el proyecto y compilas :)
You know the IDE , so just open the project and run the build :)

"Warning: Ensure the project folder has write permissions. A read-only directory will lead to application crashes."
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2716
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: VisionEngine Library

Post by danielmaximiliano »

Nota :
:( ajustado para 640x480 :(
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3412
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: VisionEngine Library

Post by serge_girard »

Thanks Daniel !
There's nothing you can do that can't be done...
User avatar
Steed
Posts: 453
Joined: Sat Dec 12, 2009 3:40 pm

Re: VisionEngine Library

Post by Steed »

Thanks
User avatar
danielmaximiliano
Posts: 2716
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: VisionEngine Library

Post by danielmaximiliano »

Hola a Todos !!!
Mientras tengo tiempo como Piercer ( mi actual trabajo ) deje la electronica y programacion (despues de 30 años de actividad) volvi con ese proyecto que surgio de una pregunta en el foro...
cambie el rumbo de la app que escanea un codebar (con ayuda de Zbar "Todos") pero en la logica solo EAN13 y QR, veia que funcionaba pero era muy lineal y contenia errores que IA corrigio.. asi que como siempre me gusto leer sobre threads y pedirle a la IA ejemplos de usos para ver su funcionamiento lleve a VisionEngine a VisionEngineMT ...esto es Interfaz de usuario despegado del motor (MF + Zbar y proximamente HBZEBRA!!!!)
se los dejo para su uso !!!!
los leo y gracias por compartir sus experiencias en cada post dentro del Foro... lastima que en el camino van quedando los viejos Clipperos :|

Hello everyone!
While I have some free time as a Piercer (my current job), I've put electronics and programming aside (after 30 years in the field). I've returned to a project that originated from a question on the forum... I changed the direction of the app that scans barcodes (using Zbar "Todos"), but in the logic, it only handles EAN13 and QR codes. I saw that it worked, but it was very linear and contained errors that AI corrected. So, as I always enjoy reading threads and asking AI for usage examples to see how it works, I brought VisionEngine to VisionEngineMT... This is a user interface detached from the engine (MF + Zbar and soon HBZEBRA!!!!)
I'm sharing it with you for your use!
I read your posts and thank you for sharing your experiences in each one on the forum... It's a shame that the old Clippers are being left behind.

open cmd:

Code: Select all

cd c:\VisionEngineMT\Source

Code: Select all

BuildLib
Result

Code: Select all

==========================================
CLEAN OBJECTS
==========================================
==========================================
COMPILING ENGINE
==========================================
==========================================
COMPILING BRIDGE
==========================================
==========================================
BUILD STATIC LIB
==========================================
==========================================
EXPORT CHECK
==========================================
0000000000000220 b _ZZ12Vision_GetQRE3out
0000000000000320 b _ZZ20Vision_GetDeviceNameE4name
00000000000015c0 T Vision_CountDevices
0000000000000cb0 T Vision_GetDeviceName
0000000000000e20 T Vision_GetLog
0000000000000f60 T Vision_GetQR
00000000000015a0 T Vision_GetType
0000000000001590 T Vision_HasNewQR
0000000000000be0 T Vision_Init
0000000000000fe0 T Vision_SaveSnapshot
0000000000001580 T Vision_SetDebug
00000000000015b0 T Vision_SetFrame
0000000000000f00 T Vision_SetPreviewWindow
0000000000000e30 T Vision_Stop
                 U Vision_CountDevices
                 U Vision_GetDeviceName
                 U Vision_GetLog
                 U Vision_GetQR
                 U Vision_GetType
                 U Vision_HasNewQR
                 U Vision_Init
                 U Vision_SaveSnapshot
                 U Vision_SetDebug
                 U Vision_SetFrame
                 U Vision_SetPreviewWindow
                 U Vision_Stop
==========================================
Open your IDE and compile in 64-bit mode

Proyect --->
VisionEngineMT.rar
(1.91 MiB) Downloaded 26 times
📄 Vision.log – Technical Reference
Overview

vision.log is a runtime diagnostic log file generated by the VisionEngineMT system. It records high-level system events, including initialization, shutdown, camera status, and barcode detection results.

The log is designed for debugging, system monitoring, and post-run analysis of the Vision Engine pipeline.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
serge_girard
Posts: 3412
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: VisionEngine Library

Post by serge_girard »

Thanks Daniel !
There's nothing you can do that can't be done...
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: VisionEngine Library

Post by franco »

Thanks Daniel ...
All The Best,
Franco
Canada
Post Reply