| | |
quantisation of image colours
![]() |
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
hi i have an image which i can get RGB values, i have to quantitize it , a new to this i think i know the principle but need a few pointers as to how to go about "mapping" the image to a range of colours. basically i am doing a grey scale whic works but on colours not black thru to white it is greying only slightly. so i need to reduce the colour values.
hope someone can help.
regardes
ash
hope someone can help.
regardes
ash
I think you need to state your problem a little more clearly for us. Are you trying to reduce the number of colors in a color image, or are you trying to convert a color image to greyscale? Or something else?
Don't own a gun but I'm going to join the NRA.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
•
•
Join Date: Nov 2008
Posts: 4
Reputation:
Solved Threads: 0
hi sorry about late reply, am trying to reduce the colours. i have whittled it down to performing something called a median cut. but unsure as to how to start . ie i need to first section the whole image and then break down the image into clusters of fewer colours. i think i know the principle but unsure of how to section etc..hope this helps explain. basically it works but colours are to many. thnx
This is not a trivial algorithm to implement. I'm familiar with it in general terms, and you can find some sample implementations to give you an idea of where to go.
The idea is not to segment the image, but to segment the color values found in it. Then replace the colors at each pixel with the palette color that it maps to in the color segmentations.
The idea is not to segment the image, but to segment the color values found in it. Then replace the colors at each pixel with the palette color that it maps to in the color segmentations.
Don't own a gun but I'm going to join the NRA.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
Kind of sort of. The final step would be something like that, but it's a long way to get there.
Here's my understanding of the basis of Median Cut. First find what colors exist in the image, essentially a 3D histogram. Find the plane that divides the unique color triplets in half, making two boxes with equal number of colors. Divide each of those boxes at the plane (not necessarily the same in each box) that cuts the number of colors in each of the now 4 boxes to equal numbers. Keep dividing till you have the number of boxes representing the desired number of colors in the target palette. Find the median color in each box - these will be your palette colors. Then map each color in the image to that median color in the box in which the image color exists.
Here's my understanding of the basis of Median Cut. First find what colors exist in the image, essentially a 3D histogram. Find the plane that divides the unique color triplets in half, making two boxes with equal number of colors. Divide each of those boxes at the plane (not necessarily the same in each box) that cuts the number of colors in each of the now 4 boxes to equal numbers. Keep dividing till you have the number of boxes representing the desired number of colors in the target palette. Find the median color in each box - these will be your palette colors. Then map each color in the image to that median color in the box in which the image color exists.
Don't own a gun but I'm going to join the NRA.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
I figure anything that irritates liberals is worth my support.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
![]() |
Other Threads in the C++ Forum
- Previous Thread: Graph help please
- Next Thread: Old Borland C++ compiler
Views: 369 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for C++
algorithm api array arrays assignment beginner binary browser c++ c/c++ calculator char class classes code compile compiler console constructor conversion convert count delete desktop dll dynamic encryption error file files filestream fstream function functions game givemetehcodez graph gui homework i/o iamthwee input int lazy library linked-list linker list loop loops math matrix member memory network newbie number object objects opengl operator output parameter pointer pointers problem program programming project random read recursion recursive reference server sort sorting spoonfeeding string strings struct student studio template templates text time tree undefined variable vc++ vector video visual visualstudio void win32 window windows winsock






