WEBCAM functions

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

WEBCAM functions

Post by serge_girard »

Hello All !

I was wondering if HMG could be used for Webcam issues.
Then I found this:

http://code.google.com/p/fivewin-contri ... r&can=2&q=

http://forums.fivetechsupport.com/viewt ... =6&t=22606

I copied and adepted to HMG (as far as possible: C STRUCTURE .. instead of STRUC, ) but can't get it working.

Anybody has any experience with this?

Greetings and thanks, Serge
There's nothing you can do that can't be done...
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: WEBCAM functions

Post by danielmaximiliano »

Hi Serge :
HMGext (Minigui) has examples of using cameras webcam
are in

Code: Select all

C:\MiniGUI\SAMPLES\Advanced\WebCam
C:\MiniGUI\SAMPLES\Advanced\WebCam_2
You can publish some of the modified code to see how it works and fix it to work on HMG / Harbour
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

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

Re: WEBCAM functions

Post by serge_girard »

Thx Daniel !

I will let you know.

Serge
There's nothing you can do that can't be done...
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: WEBCAM functions

Post by mustafa »

Hola Serge
El Sample de Minigui, en HMG está dando error en:

*------------------------------------------------------------------------------*
Procedure StartClick()
*------------------------------------------------------------------------------*

// If ! ISNIL(CamSource) <--------- ????????????
webcam.Label_0.Visible := .F.

previewCamera()

webcam.Button_1.Enabled := .T.
webcam.Button_4.Enabled := .F.
webcam.Button_2.Enabled := .T.
// EndIf <--------- ???????????

Return
Si se suprime "ISNIL", parece que funciona en HMG
un saludo
Mustafa :idea:

*------------------------------------------------------------------*


Hi Serge
The Sample MiniGUI in HMG is giving error:

*------------------------------------------------------------------------------*
Procedure StartClick()
*------------------------------------------------------------------------------*

// If ! ISNIL(CamSource) <--------- ????????????
webcam.Label_0.Visible := .F.

previewCamera()

webcam.Button_1.Enabled := .T.
webcam.Button_4.Enabled := .F.
webcam.Button_2.Enabled := .T.
// EndIf <--------- ???????????


If "ISNIL" deleted, seems to work on HMG
a greeting
Mustafa :idea:
Attachments
webcam.zip
(14.81 KiB) Downloaded 288 times
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: WEBCAM functions

Post by serge_girard »

Mustafa,

I changed ISNIL to IF !CamSource == Nil
and the repeat-until to
DO WHILE .t.
lConnect := capDriverConnect(hWnd, CamSource)
IF !lConnect .Or. ++i > nMaxAttempt
EXIT
ENDIF
ENDDO

Now I'm looking for 'moving-detection'

Greetings and thanks,

Serge
There's nothing you can do that can't be done...
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: WEBCAM functions

Post by mustafa »

Hola Serge
Si resuelves, el sample, ya publicaras el código fuente, creo que tampoco
salva el fichero avi
*---------------------------------*
Hi Serge
If I solve the sample, and will publish the source code, I think not
save the avi file
Regars
Mustafa
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: WEBCAM functions

Post by srvet_claudio »

mustafa wrote: Hi Serge
The Sample MiniGUI in HMG is giving error:

*------------------------------------------------------------------------------*
Procedure StartClick()
*------------------------------------------------------------------------------*

// If ! ISNIL(CamSource) <--------- ????????????
webcam.Label_0.Visible := .F.

previewCamera()

webcam.Button_1.Enabled := .T.
webcam.Button_4.Enabled := .F.
webcam.Button_2.Enabled := .T.
// EndIf <--------- ???????????


If "ISNIL" deleted, seems to work on HMG
a greeting
Mustafa :idea:
Hi all,
add the header file of Harbour:

#include <common.ch>

Code: Select all

/* Type checking macros */
#translate ISNIL( <xValue> )       => ( <xValue> == NIL )
#translate ISARRAY( <xValue> )     => HB_ISARRAY( <xValue> )
#translate ISBLOCK( <xValue> )     => HB_ISBLOCK( <xValue> )
#translate ISCHARACTER( <xValue> ) => HB_ISSTRING( <xValue> )
#translate ISDATE( <xValue> )      => HB_ISDATE( <xValue> )
#translate ISLOGICAL( <xValue> )   => HB_ISLOGICAL( <xValue> )
#translate ISMEMO( <xValue> )      => HB_ISMEMO( <xValue> )
#translate ISNUMBER( <xValue> )    => HB_ISNUMERIC( <xValue> )
#translate ISOBJECT( <xValue> )    => HB_ISOBJECT( <xValue> )
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: WEBCAM functions

Post by serge_girard »

Thanks Claudio!


Serge
There's nothing you can do that can't be done...
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: WEBCAM functions

Post by quartz565 »

Hi Serge,

if you are only interested to take images from Webcam, here is a small adjustment in
Filatov' s program.



Nikos
Attachments
webcam.rar
(173.93 KiB) Downloaded 362 times
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: WEBCAM functions

Post by serge_girard »

Thank you Niko!

I will have a look at it tomorrow.


Serge
There's nothing you can do that can't be done...
Post Reply