Author Topic: Convert color images to grayscale ones - using a batch process  (Read 556 times)

Offline JohnDrummond

  • Newcomer
  • Posts: 13
Hi. My STL11000M CCD is experiencing problems, so I put the 500D DSLR on the 35cm SCT last night. I imaged in 'Colour Raw' and took images of comets - to stack/process but also to use for astrometry in Astrometrica. When the image is opened in Astrometrica it states that it 'Can not read 'RGB or 3 dimensional FITS files'.  I then used PixInsight to convert an image to Gray scale (Image - Color Spaces - Convert to Grayscale). The image could then be opened in Astrometrica. I'm wondering if a script can be recorded/used to convert the ~100 colour images to grayscale ones - i.e. I don't need to convert each image one at a time but rather record the process and press run and the same process is done to all the images automatically.

I'm fairly new to PixInsight, so apologies if this is a dumb question.

Regards
John Drummond, NZ

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Convert color images to grayscale ones - using a batch process
« Reply #1 on: 2019 April 20 13:05:43 »
it's not a dumb question - DSLRs can be tricky.

i guess this all depends on how you have the RAW file handler module configured. if the image was debayered by the RAW module, then what you did is likely correct. however if the RAW file handler was set to open the CR2 file in raw mode, then the image was never debayered. check if the greyscale image seems to have a "screen door" look to it. if not, you are OK.

to do a batch process in PI you use the ImageContainer process, which is at the bottom of the Process menu. you load the input files into the ImageContainer gui and optionally set the output file name template and output directory. then you drag the triangle of ImageContainer to the desktop, creating a process icon.

ordinarily you'd configure your process to do what you want it to do, and then drag the triangle of that process to the desktop, producing another process icon. then you drag that process icon onto the ImageContainer process icon and away it goes.

however in this case the Image > Color Spaces > Convert to greyscale has no gui, so what you need to do is apply it to some random image open on your desktop, and then right-click the image and select "load history explorer". then, if you open the history explorer from the tab on the lower left of the screen, you'll see ConvertToGreyscale as the last step in the process history. you can click on the little icon in there and drag it to the desktop, then do what i described above. this trick works generally for all the PI menu options that have no GUI (invert, etc.)

having said all that, you can do astrometry from within PI. if you just use the ImageSolver script (after giving appropriate scale and location hints) your image will be annotated with WCS coordinates. the latest version of PI has a readout cursor which will read RA/DEC after an image has been solved this way.

rob



Offline JohnDrummond

  • Newcomer
  • Posts: 13
Re: Convert color images to grayscale ones - using a batch process
« Reply #2 on: 2019 April 20 14:43:21 »
Awesome, it worked! Thanks Rob...

Regards
John