LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Information regarding to search rectangle in IMAQ Find pattern 4 vi.

Solved!
Go to solution

Hello, 

I need some information regarding to search rectangle in IMAQ find pattern 4 vi.

I am detecting one object and without using find rectangle it takes some millisecond to detect it and finish the loop, lets suppose 15ms.

As area of detection is fixed I though Its better to use Search rectangle in order to speed up object detection, but somehow it also takes 15ms to finish loop.

It would be nice if anyone can explain the requirements of search rectangle.

Thank you very much in advance.

Regards,

Ankit. 

0 Kudos
Message 1 of 5
(3,375 Views)

Hi Ankit,

 

I think it is a remarkable observation. As it is indicated in the Vision Manual "Search Rect" specifies a rectangular search area in an image. Since it is not explicitly mentioned that enabling this feature results in a faster detection (although it is a fair argument); I wouldn't hypothesize like that.

 

There are many parameters that might play a role during pattern recognition such as where the search starts, in which direction it scans, which algorithm it uses, step size etc. You can probably check this phenomenon by performing several different tests with different parameters/patterns.

 

Another question: How did you measure the detection time? Is it always the same or does it change when you use different parameters? Can you share your VI with us?

 

Also here is a similar observation that I came across in the forum:

 

http://forums.ni.com/ni/board/crawl_message?board.id=200&message.id=34851

 

Many thanks,

Bart

 

0 Kudos
Message 2 of 5
(3,156 Views)

Hi Bart,

Thank you very much for your reply.

I just used object detection(IMAQ Find pattern 4) vi, and in same vi, First I tried to detect object with normal picture and then I set ROI to detect object from it. For that I used timer function to note down the time to execute single operation. 

I detect the same object with and Without ROI. I need to search that vi and I will post it.

0 Kudos
Message 3 of 5
(3,144 Views)
Solution
Accepted by topic author AnkitRamani

Hi Ankit,

 

In the meanwhile I also did a quick test with a LabVIEW Example: "Pattern Matching.vi"

 

As the IMAQ Find Pattern 4 has "Elapsed time (ms)" output, you can use it. After having created an indicator for "Elapsed time (ms) I did the following:

 

1) Run the VI as it is, i.e. without ROI and check the time. With my system I got ca. 9 ms

2) Defined a ROI by creating and defining a constant for the "Search Rect" input of IMAQ Find Pattern 4. I ran the VI again and recorded a time of ca. 6 ms. So with this setup and example I was able to observe an improvement by defining a ROI.

 

Hope this helps.

Bart

Message 4 of 5
(3,139 Views)

Hi Bart,

Thank you very much.

That means defined ROI function help to reduce the detection time of Object. I will try by using Elapsed time to check Object detection time. 🙂

That is what I am searching for, Thanks once again. 

 

Regards, 

Ankit.

0 Kudos
Message 5 of 5
(3,135 Views)