Search found 5 matches
- 2018-05-23T09:38:56-07:00
- Forum: Users
- Topic: Detecting "nearly" grayscale
- Replies: 3
- Views: 3412
Re: Detecting "nearly" grayscale
The S channel of HLS (or C channel of HCL) gives the saturation (or chroma), on a scale of 0.0 to 1.0. If the mean of this is low, the image is close to gray. However, an image that is totally gray except for a few high-saturation pixels will be, on average, nearly gray, so you might prefer to find ...
- 2018-05-22T14:28:56-07:00
- Forum: Users
- Topic: Detecting "nearly" grayscale
- Replies: 3
- Views: 3412
Detecting "nearly" grayscale
I noticed that "convert" will automatically change the colorspace from RGB (or sRGB) to Gray with some images. AFAICT, it does this when all of the channels are identical. However, I often come across RGB images that are essentially grayscale, but the channel statistics are not *quite* identical ...
- 2018-05-22T11:29:06-07:00
- Forum: Users
- Topic: Glueing images together
- Replies: 2
- Views: 2736
Re: Glueing images together
Assuming 40 pix: montage *.jpg -tile 2x20 NewMontage.jpg You could use a script to count the jpgs and insert the proper number in the -tile flag. ETA: this python3 script should work for you #!/usr/bin/env python3 # coding=utf-8 ## call with dir of jpg import os import sys import math import ...
- 2017-12-09T14:32:47-07:00
- Forum: Users
- Topic: Check single column of pixels
- Replies: 6
- Views: 5239
Re: Check single column of pixels
Is toes.png an image you test with? I tried this: magick image02.jpeg -gravity north -crop 1x+0+0 +repage -format "%[fx:standard_deviation]\n" +write info: -scale 1x1! -format "%[pixel:u.p{0,0}]\n" but I got an error: magick: MissingArgument `-format' at CLI arg 13 @ fatal/magick-cli.c ...
- 2017-12-07T13:41:14-07:00
- Forum: Users
- Topic: Check single column of pixels
- Replies: 6
- Views: 5239
Check single column of pixels
I'm processing a series of images similar to book scans. Most of the time they can simply be split in two, and I've set up a bash script calling convert to do just that. However, occasionally a single image runs across the entire spread. I want to flag these for manual checking. I'm thinking that I ...