Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Image Capture and Store Visual Basic 6.0

Status
Not open for further replies.

eyeanand

Junior Member level 1
Joined
Oct 25, 2009
Messages
19
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,293
Location
mumbai
Activity points
1,416
I am stuck at one point .....need help.

WE have installed ezvidcap activeX control and can access the webcam(Intex 400k). however when we try to grab multiple images using the SaveDIB method and load it into a picture box....this does not work. the Images are getting stored in the given path with sequential numbers however it is not geting loaded into the picture box....need help please.

thanking everyone. sending the code as well if any glitches please suggest remedy.


Option Explicit
Dim y As Integer
Dim x As Integer
Dim w As Double
Dim p As Picture
Dim t As Integer

Private Sub ezVidCap1_StatusMessage(ByVal StatCode As Long, ByVal StatString As String)
''ezVidCap1.ShowDlgVideoFormat

End Sub

Private Sub Form_Load()
ezVidCap1.ShowDlgVideoFormat
For y = 1 To 10
'ezVidCap1.CapSingleFrame
ezVidCap1.PreciseCaptureStart

ezVidCap1.SaveDIB ("C:\Documents and Settings\Comp4\Desktop\Project software\pic" & y & ".dib")

For x = 1 To 10000

w = w * 2 / 3 + 1

Next x
Set p = LoadPicture("C:\Documents and Settings\Comp4\Desktop\Project software\pic" & y & ".dib")
Picture2.Picture = p
'Image1.Picture = p
Next y
End Sub
 

seadolphine2000

Advanced Member level 3
Joined
Apr 12, 2005
Messages
881
Helped
122
Reputation
244
Reaction score
86
Trophy points
1,308
Activity points
7,374
I have two comments:
1- What is the use of the variable "w"? ... I'll assume it's a sort of delay.
2- Also, what is the use of the sub "ezVidCap1_StatusMessage"?

Can you load a single picture? The problem may be in the string containing the picture name.
 

eyeanand

Junior Member level 1
Joined
Oct 25, 2009
Messages
19
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,293
Location
mumbai
Activity points
1,416
I have two comments:
1- What is the use of the variable "w"? ... I'll assume it's a sort of delay.
2- Also, what is the use of the sub "ezVidCap1_StatusMessage"?

Can you load a single picture? The problem may be in the string containing the picture name.
Hey, The w variable is used to create the delay.....infact i have resorted to timers now..but the code doesnot load successive picture even though it stores them....also while storing all pictures look thee same......i think its not capturing consecutive images either.

ezVidCap1_statusMesage is some sub routine which gets executes at the form load to change the video format.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top