Re: how find amount of different values in a matrix?



Adam Chapman wrote:
Hello,

I'm trying to find the amount of different individual colours in an
image.
The image is in RGB format so pixel colour will be defined by
image(:,:,1:3).

The only way I can think of doing this is by searching through the
image one pixel at a time and recording the colour of the current
pixel, then checking to see if it has already been sen in a previous
pixel.

Surely there must be a faster way

any ideas?

hist or histc, maybe?

--
.



Relevant Pages

  • Re: resizing JPEGs (with Img and photo image)
    ... variable for the amount to expand by.... ... # check coef ... # weight each initial pixel by cx & cy ... satellite imagery superimposed over ...
    (comp.lang.tcl)
  • Re: Calculating Area of Scanned Image
    ... the fact that a pixel is red or any other colour doesn't affect ... the file size - every pixel has the same amount of colour information and it ... > For example, if I were to draw circles on a sheet of paper, scan the paper ... is there a way to find out the area on the screen that the red paint ...
    (microsoft.public.excel.misc)
  • =?iso-8859-1?Q?Re:_=5BNMZ=5DSch=FClerzirkus?=
    ... Amount: 150% ... Radius: 0,3 Pixel ... Nun hast Du eine moderate Nachschärfung, ohne aber das Rauschen im Bild zu verstärken und ohne starke Schärfungstreppchen oder Artefakte. ...
    (de.rec.fotografie)
  • Re: Efficient visualization of pixmaps
    ... of computation just to get the color of a single pixel. ... to see that Microsoft's pixel setting routines were the bottleneck of my ...
    (microsoft.public.dotnet.languages.csharp)
  • how find amount of different values in a matrix?
    ... I'm trying to find the amount of different individual colours in an ... The image is in RGB format so pixel colour will be defined by ...
    (comp.soft-sys.matlab)

Loading