Yes. Perfect. Thank you.
But this are not the originials, right?
The originals were scanned with a commercial scanner and then opened and rotated with QuPath.
Iām writing this because I wonder where the strange artifacts come from:
This checkerboard patterns can be found all over both images and disturbing. In the following I have downsampled the images to half of their original size to reduced the negative effects of this patterns.
Since it is unclear to me what you want to measure exactly I would like to use ImageJ/Fiji first. Letās do the QuPath processing in the next step.
I also would like to skip absorbance, stain vector, color deconvolution etc. stuff for now. I assume that there is a more simple solution. Letās see ā¦
After converting your original images A and B to RGB stacks it can be seen that the strongest effect of the different staining itensity is visible in the green and blue channel. (This could be a result of the characteristics of the DAB absorbance.)
The red channel of both images are more similar than the green or blue channels.
Therefore I start a first approach by using the red channel, reduce the image size to remove the pattern, apply a local threshold and overlay the thresholded image onto the red channel.
The result look like this:

If this looks interesting to you, then apply the following macro to your original image (your link) in Fiji !!!
(It is important to use Fiji not plain ImageJ because Fiji has the inbuild AutoLocalThreshold functions.)
// Macro : DetectPositiveCells.ijm
title = getTitle();
run("RGB Stack");
setSlice(3);
run("Delete Slice");
run("Delete Slice");
w05 = getWidth()/2;
h05 = getHeight()/2;
run("Size...", "width=" + w05 + " height=" + h05 + " depth=1 constrain average interpolation=Bicubic");
run("Duplicate...", "title=threshold");
// For more info regardin 'Auto Local Threshold' see
// https://imagej.net/Auto_Local_Threshold
//run("Auto Local Threshold", "method=Sauvola radius=30 parameter_1=0 parameter_2=0");
run("Auto Local Threshold", "method=Phansalkar radius=30 parameter_1=0 parameter_2=0.6");
run("Copy");
selectWindow(title);
run("Add Slice");
run("Paste");
run("Make Composite", "display=Composite");
setSlice(2);
run("Grays");
selectWindow("threshold");
close();
showMessage("Macro", "Done");
You can use/test different local threshold methods and vary the parameters settings.
Please let us know if this gives meaningfull results and if this are the objects you want to quatify.