Tomando fotos con la webcam

User avatar
FranciscoA
Posts: 2164
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Tomando fotos con la webcam

Post by FranciscoA »

Antonio.
Compilé en W8 y funcionó bien, hasta que se me ocurrió presionar el botón 'Traspasar'.
Ya no funcionó más. Al entrar, nuevamente, presenta la pantalla de la imagen pequeñísima, y no volvió a capturar ya más.

Apagué el cpu pensando tal vez... pero lo mismo. Pero... ojo, por primera vez mi computador presentó mensaje de que Windows estaba tratando de eliminar un malaware. Francamente no sé.

Volví a compilarlo y lo mismo.

Bajé tu ejecutable de prueba, y exactamente el mismo comportamiento. No me funciona.

Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
Posts: 2164
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Tomando fotos con la webcam

Post by FranciscoA »

Resuelto!!!

Re-instalé los drivers de la camara y volvió a funcionar.
Es decir, cambié a otro puerto usb y Windows instaló los drivers nuevamente.

Saludos.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
leandro
Posts: 1759
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Has thanked: 42 times
Been thanked: 11 times
Contact:

Re: Tomando fotos con la webcam

Post by leandro »

Antonio, ya funciono, pero tuve que cambiar el formato del vídeo a YUY2, en formato MJPG no funciona. Muchísimas gracias con esto logro solucionar el inconveniente que tenia.

Windows 10 64 bits

Image
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 24.09 ] [ xHarbour 64 bits) ]
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 81 times
Contact:

Re: Tomando fotos con la webcam

Post by Antonio Linares »

Usando mod_harbour para tomar fotos / Using mod_harbour to take photos

https://www.modharbour.org/modharbour_samples/photo.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
wartiaga
Posts: 219
Joined: Wed May 25, 2016 1:04 am

Re: Tomando fotos con la webcam

Post by wartiaga »

Antonio Linares wrote:Usando mod_harbour para tomar fotos / Using mod_harbour to take photos

https://www.modharbour.org/modharbour_samples/photo.prg


Amazing! Can you provide source code? Thanks!
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 81 times
Contact:

Re: Tomando fotos con la webcam

Post by Antonio Linares »

here you have it:

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/photo.prg

In fact you don't need to run any app at all. Simply save the HTML on a local file and you may even open it from a local HTML file from your browser :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
artu01
Posts: 400
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: Tomando fotos con la webcam

Post by artu01 »

Excelente Antonio!
tengo una duda todo ese codigo que esta en HTML lo has digitado o haz utilizado alguna herramienta ?
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 81 times
Contact:

Re: Tomando fotos con la webcam

Post by Antonio Linares »

Son ejemplos que busco por la web y los adapto a mod_harbour :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8759
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Tomando fotos con la webcam

Post by Enrico Maria Giordano »

I'm referring to the sample for Windows. I'm trying to change the width and height of the capture window without success (top and left work fine, though):

Code: Select all | Expand

oWC:CreateWnd( oWnd , 25, 10, 200, 120 )


Replacing 200 with 100 (as an example) nothing changes.

What am I missing? Is it possible to change width and height of the capture window? If yes, how?

EMG
User avatar
Silvio.Falconi
Posts: 7143
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Tomando fotos con la webcam

Post by Silvio.Falconi »

Is It possibile have Two or many webcam into One dialog?
The cam link from a link or lan
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Enrico Maria Giordano
Posts: 8759
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Tomando fotos con la webcam

Post by Enrico Maria Giordano »

Found! The problem is here:

Code: Select all | Expand

SetWindowPos(::hWnd,HWND_BOTTOM,0,0,oStatus:nWidth,oStatus:nHeight,;
             nOr(SWP_NOMOVE,SWP_NOZORDER ) )


Once this is commented out, we can change width and height of the capture window.

EMG
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 81 times
Contact:

Re: Tomando fotos con la webcam

Post by Antonio Linares »

Thank you Enrico
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
AIDA
Posts: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: Tomando fotos con la webcam

Post by AIDA »

Hola otra vez yo dando lata :mrgreen:

Aplique el código del photos.prg dentro de mi programita pero al ejecutarse no pregunta que controlador de camara se va usar
solo sale el cuadrito negro :shock: .

Image

pero si lo compilo fuera de mi programa funciona perfecto que sera lo que falta o lo que causa problema :?:

Image


Saluditos :wink:
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
Antonio Linares
Site Admin
Posts: 42561
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 35 times
Been thanked: 81 times
Contact:

Re: Tomando fotos con la webcam

Post by Antonio Linares »

Aida,

Pulsa en "opciones" y en "formato" y dinos que te aparece, gracias

Incluye dichas opciones en tu app y comprueba que aparece
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
AIDA
Posts: 879
Joined: Fri Jan 12, 2007 8:35 pm

Re: Tomando fotos con la webcam

Post by AIDA »

al pulsar en los botones no pasa nada no sale nada :|

el código esta sin modificar solo lo maquille en aspecto visual

Image

internamente no funciona

Code: Select all | Expand

REDEFINE BTNBMP oBtnOkKM PROMPT FWString("Add Photo") ID 4032 OF oSof FILE "OPEN"  Left FONT oFontV GRADIENT bGrad ACTION   FotoCamara()



pero si lo ejecuto externamente si funciona

Code: Select all | Expand

REDEFINE BTNBMP oBtnOkKM PROMPT FWString("Add Photo") ID 4032 OF oSof FILE "OPEN"  Left FONT oFontV GRADIENT bGrad ACTION WinExec("photos.exe")
Last edited by AIDA on Fri Apr 23, 2021 3:10 pm, edited 1 time in total.
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
Post Reply