LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Vision Module] IMAQ Rotate blacks the whole Image out

Solved!
Go to solution

Hey!

 

I want to rotate a binary Image. Using IMAQ Rotate, the whole Input Image gets black before it rotates it and puts in on white backgrund. You can see in my example.

 

Thanks for any help.

Download All
0 Kudos
Message 1 of 9
(3,417 Views)

Hi

In imaq  rotate function you have different features. Use detailed help function to understand how to configure those functions for your application. your code is not opening with my LabVIEW version. can you please share your code in LV2014. 

Happy to Wire
Message 2 of 9
(3,363 Views)

Some (all?) of the IMAQ Image Processing Functions are (shall we say) "under-documented", and IMAQ Rotate is one of them.  I recommend the World Wide Web, a.k.a. Ask Google -- if you type "IMAQ Rotate Example", you will find some ideas to try out.

 

Bob Schor

Message 3 of 9
(3,361 Views)

Uploaded the VI for LV14.

 

I already googled of course, but no help.

Also, I only have to use this because there is no degree setting for IMAQ Rake 3.vi. I want this VI to Rake in a defined angle instead of the definable 0° or 90°. Maybe there is a better possibillity to hatch the dark area, if so please help me out.

 

Greets and thanks

0 Kudos
Message 4 of 9
(3,355 Views)
Solution
Accepted by topic author nbo2058

Aha, now we get the Real Question -- you want to use Rake, but want to Rake at some angle other than 0 or 90°.

 

I've not used Rake, so I opened its Help to see how it worked, and found this:

Rake Help.png

 

do know how to create a rotated ROI, so my guess is that to Rake at, say, 30°, you put down an ROI, rotate the ROI by 30°, then use that rotated ROI with the Rake function.

 

It would be a service to the Community if you would test this and post if this solves your question.

 

Bob Schor

Message 5 of 9
(3,349 Views)

I already tried setting a rotated ROI as input, yet the "search lines" output still has a constant value for y (height). But you got it right: Thats why I want to rotate the reference picture - if Im not able to rotate the Rake tool.

 

The picture in the Help implies that its possible:

 

0 Kudos
Message 6 of 9
(3,346 Views)

Ok. So since I cant find a soloution for my initial problem, I'll keep this thread open.

I found a way to rotate the Rake tool. Actually its excatly how you said, the rotated ROI does also rotate the search lines, I just didn't know that the value of rotation of a rotated rectangle has to be 1000 per degree. So a value 45 would actually be 0,045 deg, which explains my confusion.

 

 

Thanks!

0 Kudos
Message 7 of 9
(3,328 Views)

Why are you "keeping the thread open"?  You already said that using a rotated ROI was the correct "solution" to your problem (though you made a mistake when you rotated the ROI as the units of rotations were not "degrees", a Dbl, but an integer number of "milli-degrees", admittedly a bizarre Design Decision built into the IMAQ package).  Rotating images is a tricky business, particularly since you are dealing with (integer)-pixelated data (which complicates "rotations" that produce non-integer results except when the rotation is an integer multiple of 90°), so NI did the mathematically-equivalent thing and rotated the ROI.  You might not "like" this answer, but it is (a) sensible, (b) correct, and (c) at the present time the only reasonable way to approach this topic that you raised.  So help the next guy and mark the problem as "solved".

 

Bob Schor

Message 8 of 9
(3,313 Views)
I use generally IMAQ Transform ROI : https://zone.ni.com/reference/en-XX/help/370281AA-01/imaqvision/imaq_transformroi/
-It generally takes care of x, y and angle shift and transform ROI acccording to new values and can be used further to other calculations.
Thanks
uday
Message 9 of 9
(3,309 Views)