02-09-2016 04:58 AM
Hi,
I am trying to resize an array of binary images and dsplay it with a specific interval of time.
I built a VI which working well as per my requirement but the problem is white colour is turning into blue,
I could not able to trace out the problem exactly...could you suggest some thing?
Solved! Go to Solution.
02-09-2016 06:01 AM
could you resend your vi in lower version at least 2014
02-09-2016 07:53 AM
02-10-2016 05:25 AM
Please find attached 2011 version VIs
02-10-2016 11:25 AM
You should manipulate the 1-bit pixmap 2D boolean array instead of converting to U8, rotating and convert again to U32. Even if you initiaze to color white each data point gets overwritten by a color value resulting from all the previous manipulations.
Change your Resize 2D array2.vi to receive a 2D boolean input and replace the white color constant to a boolean value (T/F doesn't matter since it will be overwritten) and change the output to the resulting 2D boolean array. In the main vi use Flatten Pixmap.vi (connect the resulting 2D boolean array to the 1-bit pixmap input) followed by Draw Flattened Pixmap.vi to obtain the resized image. You may need to invert the 2D boolean array values.
Ben64
02-10-2016 06:54 PM
ben64 a écrit :You should manipulate the 1-bit pixmap 2D boolean array instead of converting to U8, rotating and convert again to U32. Even if you initiaze to color white each data point gets overwritten by a color value resulting from all the previous manipulations.
Change your Resize 2D array2.vi to receive a 2D boolean input and replace the white color constant to a boolean value (T/F doesn't matter since it will be overwritten) and change the output to the resulting 2D boolean array. In the main vi use Flatten Pixmap.vi (connect the resulting 2D boolean array to the 1-bit pixmap input) followed by Draw Flattened Pixmap.vi to obtain the resized image. You may need to invert the 2D boolean array values.
Ben64
No need to invert, you can set the T/F colors by by wiring an array to the Color input of Draw Flattend Pixmap.vi. Set index 0 (T color) to 0x000000 for black, set index 1 (F color) to 0xFFFFFF for white.
Ben64
02-17-2016 01:02 AM
I tried it as per your update, Draw Flattened Pixmap.vi is not accepting the input values as you suggested. T colour & F colour
I also traied that rotating and convrting it to U32. but it also din't work. ![]()
02-17-2016 06:59 AM
02-17-2016 11:49 AM
@Haristhota wrote:
[...] the problem is white colour is turning into blue,I could not able to trace out the problem exactly...could you suggest some thing?
you translate the background color to a 1 fromated as an u8.
If you rotate this via -1 you get 128
your "Resize 2D array2.vi" does except an u32, so your input is auto-formated from u8 in u32, indicated by the small red dot in the upper left corner of your vi.
u8 = 128 -->
u32 = r g b = u8 u8 u8 = 0 0 128 = BLUE
you either take the pretty solution from ben64 (which I would prefer)
or you just do somthing quick and dirty like this:
or this