Research questionHow can tissue regions and patch coordinates be extracted from whole-slide images despite staining and artifact variation?Whole-slide images contain extensive background, fragmented tissue, staining differences, and artifacts that make preprocessing both error-prone and computationally expensive. These errors can also affect the patches used in downstream slide-level analysis.