04-04-2023 07:27 AM
Hi,
is there a way in vision assistant to rotate an image by an angle measured with pattern matching, coordinate system or straight edge angle? The only one I've found is the Geometry function rotation, but that only can be fed by a constant.
I can use two vision assistant express VIs where the first outputs the angle and the second rotates the image by that, but thats inconvenient and maked debugging my algorithm a lot harder.
Thx!
04-04-2023 01:04 PM
Like much of LabVIEW, the power lies in the LabVIEW functions, some of which are available (often in simplified form) as Express VIs. One of the most complex LabVIEW "families" of products is LabVIEW Vision, where one can do a lot of sophisticated manipulation of images, but doing so requires significant learning and employing the base IMAQdx functions. I recommend getting a solid understanding of LabVIEW, including using DAQmx without the Dreaded DAQ Assistant. Once you have the basic idea of Data Acquisition and the processing of (analog and cigital) data, you are ready to tackle the much trickier multi-dimensional Image Data (at least 3D, and if video, 4D data). I strongly recommend working with a colleague when starting to learn LabVIEW Vision.
There is, by the way, an IMAQ rotate ...
Bob Schor
04-05-2023 02:14 AM
I strongly disagree with the comparision you made.
The DAQ Assistant is primitive and in most of the cases its functionality can be replaced by only couple of VIs. In the vast majority of the cases (if not all) its easier to debug a code which uses the primitive daqmx functions, not to mention that the DAQ assistant cant really do longer measurements without losing samples and you can't really do complex measurements with the DAQ assistant only.
On the contrary a vision application can be developed and debugged a LOT easier if its done by the Vision assistant simply because you see the operation and the result. If the acquired image changes then easier to adapt your algorithm if you actually see what you are doing. From the "debugability" standpoint its also superior because if you use the vision assistant then you dont need to be a super specialied vision expert. Writing a proper vision app with the core VIs only is like like Neo looking at matrix code... yeah there could be a handful of people around the world who can do it, but most of us just wants the visuals of the matrix itself.
Also you can always convert the VA express VI to a normal VI and do some optimization there, but I avoid to do so cause then whoever comes next to maintain my code will give me plenty of hickups.
I'm aware of the IMAQ rotate and while I appreciate that you spent time on responding I dont think I got an answer.
04-05-2023 09:54 AM
You can create a custom VI executed as a step by Vision Assistant that takes a previous result as a parameter.
Here I created a VI named "Rotate Backwards" that takes the angle of match #1 of the step "Pattern Matching 1" to correct the image rotation:
To make my example work, you will need VA 2023 32bit and LV 2022 32bit.
Open script "Test Script.vascr", open image "Test Image.jpg", go to step "Pattern Matching 1" and select pattern "Test Pattern.png".
See the result image at the last step.
04-07-2023 09:38 AM
@1984 wrote:
I strongly disagree with the comparision you made.
In fact, you made a fair criticism. I started using IMAQdx well before the Vision Assistant was available, so learned (the hard way!) how to use the myriad of (sometimes confusing, and not-always-well-documented) IMAQdx functions to manipulate Images and extract useful information from them. My apologies.
Bob Schor