From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with using Extract contour VI with a predefined ROI

Hey!

This might be a very trivial issue since I'm new to LabVIEW. 

 

I'm trying to extract the contour from an image. I am trying to use a predefined ROI (Rectangular) instead of the regular user-defined Region ROI. It works fine with the user-defined ROI and I was able to do the further required analysis.

I'm doing this to eliminate the need to specify some region for analyzing an image. 

I have reproduced the same error by writing a small VI (Screenshot) since the original file had lots of other things. I'm just trying to get the size of the image and specify the whole rectangle that bounds the image as the ROI which seems pretty straightforward. But as I connect the ROI descriptor to the Extract Contour, it shows a red coercion dot. And the error pops up. 

Can anyone provide the reason for this error and how this can be resolved? 

 

Error -1074395720 occurred at IMAQ Extract Contour

Possible reason(s):

IMAQ Vision: (Hex 0xBFF605B8) Invalid ROI.

 

I've attached both the input files and the VI. 

 

Thanks for any help,

Prathamesh Kulkarni.

Error.JPG

Download All
0 Kudos
Message 1 of 3
(2,441 Views)

Hello prathmeshk867

you are using IMAQ Convert Rectangle to ROI (Polygon) VI to create the ROI which is the reason you are getting error in extracting contour. you should use IMAQ Convert Rectangle to ROI VI to create the ROI. just replace the vi and you will be able to proceed further. 

extract contor.PNG

 


CLD Using LabVIEW since 2013
Message 2 of 3
(2,431 Views)

 

Got it. I changed it and it works now

 

Thanks a lot,

Prathamesh Kulkarni 

 

0 Kudos
Message 3 of 3
(2,407 Views)