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 ------------------------> -Compilation-
Command line :
Code: Select all
cd c:\VisionEngine\SourceCode: Select all
set path=%path%;c:\mingw64\binCode: Select all
BuildLibya sabes usar el IDE asi que abres el proyecto y compilasCompilando 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
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."