05-06-2004 06:13 PM
05-07-2004 10:59 AM
05-10-2007 09:40 PM
hi,
i dono whether this is the correct forum for this question..if its not,could someone please direct me to the correct one?
here's my problem:
im trying to not use the CWIMAQViewer at all in my application(im using VB.NET).is it possible for me to directly save the image from Grab into a variable?i have gone thru the examples provided,but i dont understand the connection between the Viewer and the variable that i declare for the image acquired using Grab..i dont see any code that actually saves the image from Grab into the variable.even if i omit the IMAQViewer.Attach() code,the program is working fine.so,is there a way to do it?the reason i dont want to use the Viewer is because i dont need the image to be displayed or anything.i just need to do some color matching and return the color of a region in the image.
thank you..
05-14-2007 11:20 AM
05-14-2007 07:20 PM
05-14-2007 10:13 PM
at:
CWIMAQVision1.LearnColor(myImage, ColInfo, ViewRect)
wer myImage is the image from grab(), ColInfo is the color info, and ViewRect is the region.when i debug,i can see that there is no image height and width.so i suspect that the image is not passed to the LearnColor correctly.but myImage is a global variable,so i dont understand y the function cant access it..i've even tried pasting all the grab codes before LearnColor,but still getting the same error..![]()
very grateful if someone can help..need to finish this by today..
thank u so much!!
05-16-2007 10:10 PM
05-25-2007 10:29 AM
05-27-2007 09:30 PM
hi luke,
im sorry,but i dont understand wat u mean by " Where is your project at?"..did u mean the direactory where i save my project?
i save it in: P:\MyDocuments\Visual Studio Projects\vision4..and sorry if this is not wat u wanted..
anyway,wat im trying to do is use this application as a dll and call it from a console based application.the delay still exists,coz when i debug,i can see that the image doesnt exist in the variable just before i use it for my LearnColor.![]()
since placing the image acqusition codes in the form load event solved the problem in my earlier app,i placed them in the constructor for the library.and guess wat..it worked!!![]()
i also used a timer that fires every 250ms.in the timer fired event,i placed the grabCW2 codes..and i also put a 1 second delay just before the LearnColor function.
but if there is a way to place all codes in one main function,i would be very happy..coz,as i said earlier,i want all actions to be initiated by the user..if only i could solve the delay in saving the image,then im done...
thank you so much for your help..![]()
05-27-2007 10:06 PM
in the timer fired event,i placed the grabCW2 codes..
oops..its supposed to be Grab2CW![]()