LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Pixel-by-Pixel Calculation

Solved!
Go to solution

@PietH wrote:

But what about the maximum value?

If I want to calculate a maximum value from the 9 pixels and the 16 surrounding pixels.

Is that possible with vision?


Not with a kernel for sure, and I don't think any other function will do that either.

 

I think you'll have to DIY that, by getting the 2D array (or 2D Array DVR), and looping over it in 2 for loops.

 

The tricky part is to make it efficient. You'd want to avoid getting 9 pixels, and get the max of that array, for each pixel. You'd be doing a lot of calculations twice.

 

Finding a smarter way to do it might not be easy though. Avoiding recalculations means using extra memory, and also making the copies. That might not be more efficient.

 

I'd make it work first. And optimize only if it's too slow.

0 Kudos
Message 11 of 12
(370 Views)

Thanks! I will try it out with 2D Array DVR.

Peter

0 Kudos
Message 12 of 12
(358 Views)