How to do colour clustering on a PNG image with a transparent background?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a sample PNG image the background of which has been removed. See below ( well it shows the white background here but please imagine the background is clear not white).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/549673/image.png)
However when I display the image in Matlab using 'imshow' I get the image below (not surprisingly) on a black background.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/549678/image.png)
My main goal is to do colour clustering on the image with the transparent background.
Now sadly for the image with the black background, the main 5 colours I extract out of the image are below with ( no surprisingly ) black being the most dominant colour. ( See below).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/549683/image.png)
That is not I want.
I would like to do colour clustering on the image with the transparent background.
How can I achieve that?
Please advise.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Display Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!