From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Some questions about quality of displayed video, matching scaled object, and a funny issue occurs in my VI

Solved!
Go to solution

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.

0 Kudos
Message 1 of 13
(3,957 Views)

Sorry about silly question 2 (RGB <--> colorSmiley Embarassed). 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?

0 Kudos
Message 2 of 13
(3,936 Views)

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 Smiley Embarassed I just started to learn how to use Labview a few weeks ago (also just started to learn a bit about image processing). 

0 Kudos
Message 3 of 13
(3,934 Views)

Hi LePhuong,

 

Sorry for the delay. Is your problem solved?

---
Silver_Shaper | CLD
0 Kudos
Message 4 of 13
(3,930 Views)

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).

 

 

 

 

0 Kudos
Message 5 of 13
(3,927 Views)

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?

---
Silver_Shaper | CLD
0 Kudos
Message 6 of 13
(3,919 Views)

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.

 

 

0 Kudos
Message 7 of 13
(3,916 Views)

Hi LePhuong,

 

Downconvert this into LV 8.6.

---
Silver_Shaper | CLD
0 Kudos
Message 8 of 13
(3,914 Views)

Hi ₰αÇ,

 

Thanks for your prompt reply.

 

Attached is my VI in LV 8.6

0 Kudos
Message 9 of 13
(3,912 Views)

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).

---
Silver_Shaper | CLD
0 Kudos
Message 10 of 13
(3,905 Views)