cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

cluster RGB data

hogi
Level XII

In JMP it's possible to load pictures as tables - and Jed Campbell shared some cool tricks how to extract the data from a graph-picture:

From Picture to Data: Extracting graph data from a picture into a JMP Table for analysis 

 

One of the tricks: Use clustering to separate axes and grid lines from the actual data. This approach can also be used to separate data points that belong to different curves. If you know the exact number of clusters, you can use K Means Cluster, or if you want to play around, you can use Hierarchical Clustering.

 

I just tried it with the below data set

hogi_2-1744533499670.png


and was surprised by the result which I got with the default settings:

hogi_11-1744534472243.png

 

 

After some trial and error, I found the solution:
The range 0-1 has some meaning, by rescaling the columns individually, this information is lost.

After disabling the option:

hogi_4-1744533767707.png

I got a perfect separation of the data points:

hogi_7-1744533900661.png

 

For Hierarchical Clustering, one can enable 2-way-clustering:

hogi_10-1744534295624.png

which relies as well on data "on the same scale". For hierarchical Clustering, "single" seems to work as well:

hogi_8-1744534087258.png

What is your experience with clustering?

1 REPLY 1
Craige_Hales
Super User


Re: cluster RGB data

You might also want to investigate other color spaces; transforming the RGB to HLS can be useful.

One problem with RGB is interpolating between two colors...half-way between two colors tends to be gray because the center of the RGB color cube is gray. HLS interpolates a hue axis that is independent of the gray defined by lightness and saturation. There are other color spaces; some of them are supposed to model human vision and might be used for image compression algorithms (leave out details we can't see). 

https://en.wikipedia.org/wiki/Color_space 

https://en.wikipedia.org/wiki/HSL_and_HSV  JMP uses HLS for HSL

 

 

Craige