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: 

edge detection in images within intensity graphs

Prior to coding up myself, I wondered if anyone had successfully developed edge detection routines for application to images within intensity graphs (not using Vision).

Thanks,

Don
0 Kudos
Message 1 of 13
(3,520 Views)
I did it with picture control.
All you need to do is impliment the right Spatial filter (Prewitt, Roberts, and Sobel,)
Imaq does it.  See:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/632FD1C2472AFF4386256B25007481BC

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 13
(3,512 Views)

Right, I may end up using the picture control instead of intensity graph.  But the key thing I like about the intensity graph is that 2-d data array adapts to the size of the intensity graph on your front panel.  It is not clear to me how to get the data array to adapt and fill an existing picture control without completely filling the picture control at least in one dimension, and proportionately filling the other dimension.  One can get a picture control, thru the 'draw area size' property node, to change its size to adapt to the data.  But I do not want a constantly changing picture control size, I want the data to adapt to existing picture control size as how it does for intensity graph.  Do you have a clue on the best way to do that?

 

Sincerely,

 

Don

0 Kudos
Message 3 of 13
(3,506 Views)

For above, it should say "It is not clear to me how to get the data array to adapt and fill an existing picture control so that it completely fills the picture control at least in one dimension, and proportionately filling the other dimension."

 

Sorry for the confusion....

 

Don

0 Kudos
Message 4 of 13
(3,503 Views)
I've done some spatial filters using the NI FFT functions. I have also converted intensity graph images to pictures (for the purpose of drawing stuff on top that intensity graphs can't do). The attachments are a couple examples of those efforts (LV 7.1).
0 Kudos
Message 5 of 13
(3,494 Views)

Great work on both fronts as I now am able to have 2-d arrays fill picture controls and initiate the use of spatial filters with picture controls (as well as apply the latter example for use with intensity graphs).

 

Sincerely,

 

Don

0 Kudos
Message 6 of 13
(3,484 Views)
Have you ever converted picture control data back to intensity graph display?
 
It is not clear to me how to do this from the image data obtained from 'picture to pixmap' fx.  It would be easy if the intensity graph had an invoke node method to 'set image' not just to 'get image.'
 
What I tried to do was reshape the image array that is from the image data cluster into a 2-d array and send it to intensity graph which did not work and I expect is a more complicated transformation anyhow.
 
Sincerely,
 
Don
0 Kudos
Message 7 of 13
(3,475 Views)
Converting from the picture control back to an 2D data array is a little more difficult. The problem I have is converting the color value back into a meaningful number. It becomes easy (but slow) when you have a black and white image (see atachment). I'd like to see some better examples if anyone would like to give it a try.
0 Kudos
Message 8 of 13
(3,472 Views)

I forgot about the unflatten from pixmap fxs because they are on the graphics fxs and not the picture fxs pallette. For now, I guess grey scale will be fine as the speed is a bit of an issue.  So I simplified the VI to the following.

 

Sincerely,

 

Don

0 Kudos
Message 9 of 13
(3,455 Views)
This LLB combines the Intensity graph-to-picture control and reverse concepts we have discussed (at least for gray scale images).....Don
0 Kudos
Message 10 of 13
(3,438 Views)