Automatic localization of cancer on whole-slide histology images from radical prostatectomy specimens would support quantitative, graphical pathology reporting and research studies validating in vivo imaging against gold-standard histopathology. There is an unmet need for such a system that is robust to staining variability, is sufficiently fast and parallelizable as to be integrated into the clinical pathology workflow, and is validated using whole-slide images. We developed and validated such a system, with tuning occurring on an 8-patient data set and cross-validation occurring on a separate 41-patient data set comprising 703,745 480μm × 480μm sub-images from 166 whole-slide images. Our system computes tissue component maps from pixel data using a technique that is robust to staining variability, showing the loci of nuclei, luminal areas, and areas containing other tissue including stroma. Our system then computes first- and second-order texture features from the tissue component maps and uses machine learning techniques to classify each sub-image on the slide as cancer or non-cancer. The system was validated against expert-drawn contours that were verified by a genitourinary pathologist. We used leave-one-patient-out, 5-fold, and 2-fold cross-validation to measure performance with three different classifiers. The best performing support vector machine classifier yielded an area under the receiver operating characteristic curve of 0.95 from leave-one-out cross-validation. The system demonstrated potential for practically useful computation speeds, with further optimization and parallelization of the implementation. Upon successful multi-centre validation, this system has the potential to enable quantitative surgical pathology reporting and accelerate imaging validation studies using histopathologic reference standards.