Inherent to most tissue image analysis routines are user-defined steps whereby specific pixel intensity thresholds must be set manually to differentiate background from signal-specific pixels within multiple images. To reduce operator time, remove operator-to-operator variability, and to obtain objective and optimal pixel separation for each image, we have developed an unsupervised pixel-based clustering algorithm allowing for the objective and unsupervised differentiation of signal from background, and differentiation of compartment-specific pixels on an image-by-image basis. We used the Automated QUantitative Analysis (AQUA) platform, a well-established automated fluorescence-based immunohistochemistry image analysis platform used for quantification of protein expression in specific cellular compartments to demonstrate utility of this methodology. As a metric for cellular compartmentalization, we examined correlation of percentage nuclear volume with histologic grade in 3 serial sections of a large cohort (n=669) of invasive breast cancer samples. We observed a significant (P=0.002, 0.006, and 0.08) difference in mean percentage nuclear volume between low and high-grade tumors. Reproducibility of percentage nuclear volume was also significant (P<0.001) across 3 serial sections. We then quantified compartment-specific expression of 5 biomarkers in 3 cancer types for association with outcome: estrogen receptor (nuclear), progesterone receptor (nuclear), HER2 (membrane/cytoplasm), ERCC1 (nuclear), and PTEN (cytoplasm). All 5 markers showed an expected and significant (P<0.05) association with survival. This new clustering algorithm thus produces accurate and precise compartmentalization for assessment of target gene expression, and will enhance the efficiency and objectivity of the current Automated QUantitative Analysis and other image analysis platform.