LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PlotIntensity-data and screen-resolution

hi all,

the following scenario (CVI8/XP):

built a solution including some UIR-plots (PlotIntensity) on a panel. an array of 256x256 uchar gas the data of the intensity-plot. the 2-dimensional-array shows a surface-structure (just like "moutains" and "valleys"). the user can configure the height and width via a cfg-file.

if the user makes the size of the plot very small and also the "mountains" are very small some of them are not shown.
loosing of mountains begins if the pixel-size of the plot on screen is lower then the array-dimension of the value-array.

now - it is possible to change the size of the array following the size of the plot. but isn't there another way to solve the problem ?

best regards

Simon
0 Kudos
Message 1 of 10
(4,114 Views)
Hi,

do you have some example code to explain better what you mean?
I didnt understand what you want!

Thanks, RMathews
Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 2 of 10
(4,081 Views)
hallo RMathews,

its a big project and difficult to excerpt some lines of code. but the question is quite simple and I have attached a screenshoot to illustration:

1. a PlotIntensity shows an array with a dimension 256 x 256 uchar

2. I make the size of the plot very small on the screen, maybe 50 x 50 pixel.

3. the result in the GUI is, that some values of the array are not shown.

-->my explaination is:
while making the plot smaller an increasing count of values are presented by one pixel. how does CVI that realize (averaging the values, calc the maximum, only the first of the values...) ?

-->on the screenshoot you can see:
on the left hand side a big and in the upper right corner a little PlotIntensity with the same dataset. in the little plot some points are not visible.

-->now this is a big problem for this measuring-device: because every single value if not zero has to be shown.

thanks and regards

Simon
0 Kudos
Message 3 of 10
(4,066 Views)
Hi,

it seems to me, that you want to show points, that are smaller than a Pixel, this is of course not possible.
I dont think that there is a possibility to realize what you want. The problem is the display and not CVI.

sorry, that I couldnt tell you something better.
Greetings, RMathews
Ramona Lombardo
Applications Engineer, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 4 of 10
(4,059 Views)
hi RMathews,

of course you are right. thought it could be possible to manipulate the method CVI handles the "some values to one pixel" - manipulation.

best regards

Simon
0 Kudos
Message 5 of 10
(4,055 Views)

Hello Simon,

If you pass 0 as the interPixels parameter, and more than one data value maps to the same pixel, then the pixel will use the value of the highest X and Y value that maps to that pixel.

If you pass 1 as the interpPixels parameter, each pixel is processed by interpolating the surrounding data values. This might be what you want to do instead.

Luis

0 Kudos
Message 6 of 10
(4,042 Views)
LuisG,

tested this, I think, the interpolatePixel-Flag only has a result if there are MORE pixels then datavalues, not if there are LESS pixels then datavalues. If there are more pixels it describes the rule how the pixels between the value-pixels are filled ?

best regards

Simon
0 Kudos
Message 7 of 10
(4,032 Views)
Simon,

I'm not sure I understand your question. If there are more pixels than values, then there are no pixels in between the value-pixels, correct?

When you tested the interpolate flag, did you observe whether each pixel is set to the average of all the values that map to that pixel, or if instead it just picks one of the values? Is that basically the question you have? Because I believe the answer is that it uses the average of all the values, but I confess that I'm not 100% positive.

Luis
0 Kudos
Message 8 of 10
(4,025 Views)
hallo LuisG,

-->You wrote: "If there are more pixels than values, then there are no pixels in between the value-pixels, correct?"

Not correct - I think. if you have e.g. an array of 32x32 values and 256x256 pixel of course you have pixels between the value pixels - or not ?

-->You wrote "When you tested the interpolate flag, did you observe whether each pixel is set to the average of all the values that map to that pixel, or if instead it just picks one of the values? "

I attached a jpg-picture including two screenshoots, in the upper one the flag is set, in the other it isnt. Both screenshots show at the left side a plot with more pixels then values and on the upper right side one with more values then pixels. All four plots show the same dataset (including some data-peaks).

Case 1: More pixels then values:

If you watch the peaks on the left hand side the peaks become bigger by using the interpolate-flag. this means for me: by setting the flag some pixels without values (between the "value-pixels") are set because they are displayed as the middle-value of the surrounding four values (so tells the CVI-help).

Case 2: More values then pixels:
If you watch the peaks on the upper right side no difference is visible.

-->You wrote: "Is that basically the question you have?"
Yes, I think so. I dont understand and can not visualize if and how this flag has consequences for plots with more values then pixels.

-->You wrote: "Because I believe the answer is that it uses the average of all the values, but I confess that I'm not 100% positive."

thats the question!

best regards and a happy sunday

Simon
0 Kudos
Message 9 of 10
(4,009 Views)
Hi Simon,
 
Yes, of course, you're correct. I was thinking of the "more values than pixels" case when I posted, since I knew that was the case you were asking about, and I didn't even notice that I was writing the opposite case. Duh.
 
As you already know, the interpolate flag is primarily intended to smooth out the pixels in between the value-pixels. I had assumed that, in "the more values than pixels" case, it would also have the effect of using the average of all the values for that pixel. So today, I tested it and I looked more carefully at the internal code, and realized that it is not the case. I can only confirm what you already noticed, which is that the interpolate flag has no effect in the "more values than pixels" case. Basically, whether you use the flag or not, each pixel will be set to the color corresponding to the highest x-value and highest y-value that maps to that pixel.
 
Luis
0 Kudos
Message 10 of 10
(3,988 Views)