10-05-2012 01:59 AM
Hello Guys,
Am a newbie, So can any one help me to sort out this issue.
This is the Sequence
Input 2D array -> indexed by 2x2 array -> find the Max and Min difference in the 2x2 array -> Result Element should be compared with input 2x2 Array each element, If its greater Replace with 1 else 0 -> At last the output array should be same as input array size.
Attached Vi for Reference. How to do this? Thanks in advance.
Solved! Go to Solution.
10-05-2012 02:29 AM - edited 10-05-2012 02:31 AM
Try something like this (LabVIEW 2011).
Modify as needed. Are the input array dimension always even?
10-05-2012 02:55 AM
@altenbach wrote:
Are the input array dimension always even?
Dear Altenbach
Thanks for the reply, Yes it's always even only and one more thing the Array Max and Min Function can be replaced with Mean Function.
10-05-2012 02:59 AM - edited 10-05-2012 03:07 AM
The mean function does not work on 2D arrays, but you can use "add array elements" and divide by four.
Is the rest of my code working for you?
(EDIT: upladed new version. You need to be careful not to overflow U8 when summing.)
10-05-2012 03:06 AM
Yes it works..
10-05-2012 03:08 AM - edited 10-05-2012 03:09 AM
Summing four U8 values can easily exceed 256, so we should convert to a better representation before taking the mean. I attached a new version above. Please discard the earlier version.