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.
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.
10-16-2007 11:23 PM
10-17-2007 12:37 AM - edited 10-17-2007 12:37 AM
I no longer have LabVIEW 7.0, but here's a quick draft to generate the profile between two cursor points, keeping the pixel pitch roughly constant.
Note that for arbitrary lines, the line will NOT fit exactly through grid points, so you would need to do interpolations.
(In a first approximation, you could simply use "index array" inside the FOR loop, but here I am using a bilinear interpolation (from this old thread, see also this related thread)
(For better visuals, you would also draw a line on the 2D graph using the "plot images" feature. I am not sure if it is available in 7.0).
Message Edited by altenbach on 10-16-2007 10:41 PM
10-17-2007 11:19 AM
10-17-2007 11:48 AM
12-24-2007 10:21 AM
Altenbach,
I just wanted to convey my (very) belated thanks to you for your extremely
helpful reply to my query. The example VI you provided was instructive and had
the bonus of demonstrating good coding technique.
Regards,
RobotBuilder
02-29-2012 10:49 AM
Suppose that I have an image that I would like to draw an arbitrary line to obtain the intensity plot shown in the picture above, can I use this llb to get what I want? can someone help me with this please?
03-01-2012 05:56 PM
Hey Mythras,
The code that was written above in this forum was from 2007, there is a good chance that it will not be compatible with your current version of LabVIEW. What version are you using and are you using any toolkits that would be potentially helpful in this application? (i.e. vision addons).
Thanks,
Doug B
03-03-2012 06:16 AM
Good evening, I am currently using the 2011 version of labview and the code is still working. I want to replace the input with a greyscale image of my choice. May I know how I can do that?
03-05-2012 11:26 AM
Hi Mythras,
Our Vision Development Module is set up to perform your desired operation so one option would be obtaining that.
If you want to do it without the Vision Development Module, you will at least need the IMAQ drivers to bring the image into LabVIEW. There is a free version available at ni.com/drivers. Once you have it in LabVIEW, you can change it into an array of pixels. The functions available to do this are demonstrated in this example: https://decibel.ni.com/content/docs/DOC-10421
Once you have a 2d array of the intensity of the picture you can display it using the intensity graph and otherwise manipulate it as shown in the IntensitySlicer example.
Hope that helps!
03-05-2012 01:53 PM - edited 03-05-2012 02:02 PM
@Mythras wrote:
Good evening, I am currently using the 2011 version of labview and the code is still working. I want to replace the input with a greyscale image of my choice. May I know how I can do that?
There is no need for any vision module. Plain LabVIEW will do just fine! 😄
You can read the image using the appropriate read function from here, then convert it to a 2D array using unflatten pixmap and send it to the intensity graph. You need to adjust the color ramp of the z-axis according to the color ramp of the image.
Of cours if you have an image and not a 2D array, it makes no sense to us an intensity graph. Simply show your image on a picture indicator and add your line using picture functions directly.
See how far you get.