04-19-2012
07:44 AM
- last edited on
04-20-2012
08:54 AM
by
MaryH
Hi,
I am doing a pattern recognition project and come up with a VI (please find attached). There are something I am not sure and would like to ask:
1. The VI works, but in a funny way: most of the time I have to switch the "Create Template/Search for pattern" button twice in order to get the VI works fine (there were only a few times I just need to click the button once). What is the problem here and how to fix it?
2. I understand that IMAQ Match Pattern works with RGB images. So is there anyway I still can get RGB images pass through IMAQ Learn Pattern, IMAQ Match Pattern, whilst the 2 "Template" and resulting "Image" are still displayed in color mode.
3. Is there anyway I can still detect the object if scaling becomes an issue (as I need to move from far distance to approach the object)? To address this issue, do I need to use IMAQ Match Geometric Pattern, which I learn from somewhere in the forum that it took a lot more time to match my result comparing with IMAQ Match Pattern?
Thanks very much.
Solved! Go to Solution.
04-21-2012 03:19 AM
Sorry about silly question 2 (RGB <--> color). Actually, in my VI all the IMAQ Extract, IMAQ Pattern Match, etc.. can only work with Grayscale (U8) images. Whenever I switch the images to RGB (U32) there will be errors of Incompatible image type (error-1074396077). As I understand, IMAQ Extract and IMAQ Pattern Match should be able to work with RGB (U32) images. Am I right?
04-21-2012 03:51 AM
Well, I've just found out that IMAQ Pattern Match can only work with Grayscale (U8). Anyway, I still don't understand why the IMAQ Extract could not work with RGB (U32) in my VI?
Appologies for all my silly questions I just started to learn how to use Labview a few weeks ago (also just started to learn a bit about image processing).
04-23-2012 09:37 AM
Hi LePhuong,
Sorry for the delay. Is your problem solved?
04-23-2012 09:58 AM
Hi ₰αÇ,
Thanks for your reply.
I still don't know how to display "Template" and "Image" in original video format (i.e. showing exactly what the vision acquisition express grabbed), whilst in the background still can send RGB (U32) through IMAQ Extract (or Grayscale (U8) through IMAQ Pattern Match) for learning and matching jobs. The reason I need to do this is that my camera is a 3 Mpx with a "not so powerful" lens system (kind of a tiny endoscope, with diameter of the scope at around 0.6mm), and thus the converted grayscale images/video would be in very bad quality to view (I still need to view the object by eyes).
04-23-2012 10:21 PM
Hi LePhoung.
Check it out the attached link http://forums.ni.com/t5/Machine-Vision/pattern-matching-program/m-p/1914589#M34855 (Msg 14) is this you want?
04-24-2012 01:27 AM
Hi ₰αÇ,
It's not what I need. The attached VI works with Grayscale images/video, whilst I need the displayed video in RGB format. I attached my VI in case you want to take a look at it.
04-24-2012 01:55 AM
Hi LePhuong,
Downconvert this into LV 8.6.
04-24-2012 02:01 AM
Hi ₰αÇ,
Thanks for your prompt reply.
Attached is my VI in LV 8.6
04-24-2012 09:29 AM
Check it out the attached link http://forums.ni.com/t5/Machine-Vision/pattern-matching-program/m-p/1914589#M34855 (Msg 14) is this you want?
Hi LePhoung,
Do you want the same thing for color video right? (I cant get your question clearly).