Page 1 of 1

Sample & Hold Pixel Colour

Posted: Tue Nov 12, 2013 9:11 am
by tiffy
I don't know if someone can find a use for this and maybe improve on the schematic. It works OK when sampling the first time, but afterwards it is as if the mouse pointer [i.e. the finger symbol] gets ignored and the rear of the mouse pointer [i.e. the back of the hand symbol] then takes over. Maybe I am doing something wrong in the schematic? :?

Personal use: Sometimes I see a picture containing a nice colour which I want to use in a project, and since I am terrible with judging/picking colour, I thought of using this schematic for this purpose and also to share this with others. :)

Description: Load a Bitmap/Jpg Picture you want to sample by means of the schematic. Move the Mouse over the Bitmap/Jpg picture you want to take samples from, the Pixel Colour will be displayed in the "Display Colour Prior to.." window. Left Click with Mouse on the desired pixel Colour, and the Colour will be Sampled and Held in the "Display Colour after..." window. The corresponding Alpa Blend, Red, Green & Blue values [A, R, G, B] for the selected Pixel Colour can then be read from the four respective displays and be used elsewhere in other projects?

Credit: to pall for using his "Colour Matrix tool" in this project, very useful tool. 8-)

UPDATED SCHEMATIC TO VERSION 1.0.5:

1. Solved the problem with the mouse.

2. Solved the Image refreshing problem, images now load correctly.

3. Removed Scaling & Resizing functions as this is what mainly caused the problems.

4. IMPORTANT: THE SCHEMATIC IS CURRENTLY SET TO LOAD A MAXIMUM IMAGE SIZE OF 700 W x 560 H Pixels. If you load a larger file size than this, the schematic will read the pixel colours incorrectly.

:) :D :lol:

Re: Sample & Hold Pixel Colour

Posted: Tue Nov 12, 2013 10:36 am
by chackl
Loogs verry good ;)

But you may do some corrections that i got here:

* Load Pic does only refresh the image if you reset a scale
* Scale seems not to be included fine if you grab the color with a scale factor

Looks good ;)

Regards
C.Hackl

Re: Sample & Hold Pixel Colour

Posted: Tue Nov 12, 2013 2:14 pm
by tiffy
chackl wrote:Loogs verry good ;)

But you may do some corrections that i got here:

* Load Pic does only refresh the image if you reset a scale
* Scale seems not to be included fine if you grab the color with a scale factor

Looks good ;)

Regards
C.Hackl


Thank you chackl, since I do this only as a hobby in my 'spare' time and still learning FS DSP Robotics I will use your advice in the schematic as soon as possible - maybe someone else will be faster than me, you are welcome. ;)

Re: Sample & Hold Pixel Colour

Posted: Tue Nov 12, 2013 7:12 pm
by RJHollins
I had a need for something along this line, and had put this basic idea together.

Nothing fancy, but it did what I needed at the time.
Get Pixel example [RJH]-1b.fsm
(55.37 KiB) Downloaded 1241 times