LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intensity graph with Z values displayed

Hello,

 

I just wonder how this intensity graph with numeric values plotted on it (Figure 2) was made :

 

https://forums.ni.com/t5/kl3m3n-s-blog/Infra-red-IR-array-sensor-with-custom-board-and-Arduino-Nano-...

 

Do you have any idea ?

 

Thank you for you help.

0 Kudos
Message 1 of 10
(4,412 Views)

He used the image overlay (property) of the graph. I think that was given as advice on one of his questions, but can't find it*.

 

You'll have to calculate the positions of the text (basic linear interpolation in X and Y direction), draw the text in an image, and put it in the graph.

 

* EDIT: maybe this one: https://forums.ni.com/t5/Machine-Vision/Draw-line-or-a-dot-for-a-specific-pixels-on-the-image/m-p/30... EDIT: never mind, that's about IMAQ.

0 Kudos
Message 2 of 10
(4,397 Views)

I would put transparent array on top of intensity graph

0 Kudos
Message 3 of 10
(4,367 Views)

@Alexander_Sobolev wrote:

I would put transparent array on top of intensity graph


I wouldn't. Smiley Very Happy

 

Spoiler
All kinds of problems... The numbers would be hard to get centered. The graph cursors don't work anymore. Scaling the array is a hassle. Changing the graphs scale would be impossible. Scaling the array isn't even possible to do right, as the array can only scale with multiples of the nr. of elements.

 

0 Kudos
Message 4 of 10
(4,361 Views)

Have you considered using the annotations?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(4,353 Views)

Hello,

 

Thank you all for your solutions.

 

I’ve almost finish doing the solution with the front image. I will post the code once completely done. However I’m not a Labview expert so be kind with me...

 

I didn’t know about annotation, I will further investigate it seem very interesting.

 

best regards

0 Kudos
Message 6 of 10
(4,348 Views)

@haha1234 wrote:

I’ve almost finish doing the solution with the front image. I will post the code once completely done. However I’m not a Labview expert so be kind with me...


You'll get credit for effort, and advice (you didn't ask for) for free! No downside!

 


@haha1234 wrote:

I didn’t know about annotation, I will further investigate it seem very interesting.


Annotations are pretty neat, but I think there where some problems when using them in practice. I'm not sure, but I think they get sluggish when you have a lot (>50?) of them? Maybe that got fixed by now, worth a try.

0 Kudos
Message 7 of 10
(4,330 Views)

wiebe@CARYA wrote:


Annotations are pretty neat, but I think there where some problems when using them in practice. I'm not sure, but I think they get sluggish when you have a lot (>50?) of them? Maybe that got fixed by now, worth a try.


I tried with 100 and set to a fix position via allow drag = false

 

is there an easy way to calculate a dynamic offset for the label position? 

e.g. how to derive the width and height of one super-pixel?

 

100_annotations.png

Message 8 of 10
(4,320 Views)

@alexderjuengere wrote:

is there an easy way to calculate a dynamic offset for the label position? 

e.g. how to derive the width and height of one super-pixel?


Not sure if that is required, as the coordinates seem to be scale space... So .5 should be the middle.

 

Anyway, to go from scale space to pixel space, you have two options. There are methods Map Coordinates to XY and Map XY to Coordinates. That should do the trick, but you'll need to do some math as the coordinates are pane coordinates. So you need to subtract the graph area position...

 

The other way is to get the width and height of the graph area, and the min and max scale (those could be flipped!) and do the interpolation yourself...

 

For both methods, if you want a relative position (like an offset), you don't need a full linear interpolation, just a linear scaling.

Message 9 of 10
(4,314 Views)

BTW. The presentation in this thread is about the image overlay.

https://forums.ni.com/t5/LabVIEW/Plotting-Types/td-p/3687321

 

And note the hint that the code should be organized, as it intentionally isn't.

0 Kudos
Message 10 of 10
(4,312 Views)