03-02-2017 04:58 AM
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.
Solved! Go to Solution.
03-02-2017 06:46 AM
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.
03-02-2017 06:57 AM
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
03-02-2017 07:18 AM - edited 03-02-2017 07:22 AM
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
03-02-2017 07:38 AM
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:
I 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
03-02-2017 08:10 AM - edited 03-02-2017 08:40 AM
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:
03-02-2017 10:41 AM
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!
03-02-2017 10:13 PM
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
03-03-2017 12:36 AM