I would like to open an image in Photoshop, use any of the selection tools to make a selection, and save the selection to a file which I can then open in another application, Matlab, to identify which pixels were selected. Several non-touching regions could be included in the selection. I know you can save a Photoshop selection to a PNG file, but unfortunately the file has the smaller size of the selected region so you can't easily ID the pixels in the original image. How can I get Photoshop to save a file containing a 'mask' where selected pixels are either white or their original color, and unselected pixels are either black or transparent?
(I am flexible on the type of saved file and its contents as long as I can use it to figure out the pixel locations. It's possible to do selections directly in Matlab, but for this particular task I must select in Photoshop then bring the results into Matlab. I could look for pixels in the selection-sized PNG file which match those in the original image, but is there is a better way?)


