Photoshop and ImageJ

Hi all,

I am starting with ImageJ. So I need some information. I need to calculate three areas in the same figure. If I set the areas with photoshop, I could calculate the areas defined in Image J?

Thanks in advance


Dear Daltro,


The first question that comes to mind is why you would need to define these in photoshop. You can define areas very easily in ImageJ/Fiji using ROIs (Regions Of Interest).
I’d suggest you have a look at to see if this covers your needs.

It will definitely take more effort to re-import your photoshop areas into ImageJ than making them in imageJ directly. If the areas are already defined in Photoshop for more than 100 images, then perhaps the effort would be worth it. If we are talking about a few tens of images, redrawing them will take less time.

Let us know if you need help defining your regions, with an example image and an expected result so we can understand what you want to achieve.



Dear oburri,

thanks for your help.

I will have a look in this link.

Best Paulo

Hi there,

I have the same problem. I need to export the selection made in photoshop to image J. Why? because photoshop is the only way I have found to separete DAB from Vector Red labelling in my double IHCs. See attached picture. I ahev tried color deconvolution, IHC toolbox and IHC profiler but none of those would tell apart the purple and red labelling. What I am trying here is to quantify DAB labelling in certain areas of the image (one marked by the Red labelling, the other the non-red labelled area)

With photoshop I have been able to select DAB and not Red through the Selection/Color Range tool and I believe that taking those selected areas (ROIs) to Image J would allow me to measure the % of DAB labelling in the two areas (Red labelled and non-red labelled).

thanks for you help

Good day!

Please tell us more precisely which colours you like to separate.

In your sample image I see roughly three dominant colours: Red-magenta, brown and lilac. Additionally I see a partly light-blue or faint reddish background.

I’m pretty sure that with ImageJ and its plugins you will be able to segment your sample image according to the colours.

An RGB-split leads to rather good results and did you try the RGB to CMYK colour-space transformation?
Then, brown shows up as contrast in the achromatic channel, red-magenta & brown in the yellow and magenta channel and lilac in the cyan channel.

If this isn’t good enough, it would help if you tell us what you do in Photoshop to achieve your desired segmentation.



1 Like

Hi Herbie,

Thanks a lot for your help! I have tried the splitting of the CMYK and it looks good although I am not sure it will be enough to completely separate the brown from the other colours.

My purpose with this is to measure the % of brown area in different parts of the picture. My approach would be first to define those parts in the original image through ROIs (and save them). Then, I want to separate the brown labelled areas, for that I plan to select those through the threshold tool (in the achromatic channel of the CMYK image) and measure the selected areas through the threshold in the ROIs (which I defined previously and now bring back from ROI manager).

Adjusting the threshold in the achromatic channel (after splitting the CMYK image) I get close to select all the brown areas but when I try to get as much brown selected as possible (moving leftwards the lower value of the threshold) I began to get to much of the strong magenta selected.

In photoshop I managed to establish a range of colors which selected quite nicely the brown areas. I save those parameters in the DAB2.axt file I attach as a .zip file. I you load the image into photoshop, then go to Selcetion/Range of colors and load the DAB2.axt file you will see what I am trying to get with ImageJ (834 Bytes)

Hope this make sense and thank you very much indeed for your help!

Good day,

and thanks for providing further insights!

Regrettably, I’m unable to load the provided “DAB2.axt”-file to my version of Photoshop.

Apart from this problem I understand now that you are exclusively interested in the selection of regions that are stained brown. Brown is not a colour that is selectively represented in a channel of one of the current colour spaces and I wonder why the “Colour Deconvolution”-plugin didn’t work for you because it is exactly made for such tasks.

I’m not sure but maybe your interpretation of what is brown isn’t reflected by formal methods and I don’t know if your personal choice generalizes to a greater set of images that are stained similarly.

It would be very helpful if you could indicate some regions in your sample image where thresholding the achromatic channel doesn’t work. This would show what you consider as brown that isn’t detected by what kind of automatic thresholding method (please specify).




Here is a binarized colour range generated by the “Colour Deconvolution”-plugin for brown as it occurs in your sample image:

If you doubt the result then please select a corresponding area, transfer this selection to the original image and zoom to the selection. I’m sure you will realize that the “Colour Deconvolution”-plugin does an excellent job.

Hi Herbie,

Thanks a lot for you help! you are a star!.

Thing is that Color deconvolution picks as brwon areas of stong magenta. See the areas circles in yellow, compare with the original image and you will see that there is no brown there, only magenta:


regarding the thresholding in imageJ, I use the Image/Adjust/threshold tool. Here you can see that when using a narrow threshold, I lose some loght brown areas (see yellow arrow):

And when I make that threshold broader, then it picks up all teh brown but a lot of magenta as well.:

So, what I try to select is what i managed to do in photoshop with the color range tool (shame you can not open the axt file). Here you can see the areas that photosop selects. You can see that almost all the brown is selected but very little, if any, of magenta:

Alternatively, do you know a good way to binarize that picture from photoshop so I can get a nice black (non selected areas) and white (selected areas) picture? I would be able to work with that.

Again, thank you so much for your help!


there are two things that appear important at this point:

  1. Never use a threshold that is set by hand because it won’t generalize and it is difficult to communicate in scientific works/publications.
    (Use one of the available automatic methods.)
  2. Please have a closer look at the areas encircled in yellow by you. The spots show a taint that is diffferent from what you name magenta. I bet that these areas show double staining. I don’t know whether it is scientificly correct but you may get rid of this extra colour by defining it as the third colour when using the “Colour Deconvolution”-plugin.

I must admit that for many reasons I use Photoshop only for image cosmetics. All scientific image processing I do with ImageJ or other dedicated software.




Here is an example where the “extra colour” received a separate colour channel (the result can still be improved):

The threshold method was “Yen”.

Dear Herbie,

Thanks for keep working in this. Regarding those areas encircled in yellow, I still believe thete is just magenta, too dark magenta, but not double labelling. I have checked undre the microscope and could not see any brown labelling there.

Finally, what has worked so far, and thanks to your suggestions, is to convert to CMYK, split it, invert the achromatic channel and then apply automatic threshold (RenyiEntropy) on it. It seems to pick up almost all brown labelling. The only catch is that in some pictures , a bit of hematoxyn is also coming as selected (see the last picture I attach), but I believe that won´t interfere with the analysis.