Search found 18 matches

by dgpeters
2018-04-12T12:57:01-07:00
Forum: Users
Topic: How do I use a colour to mask out pixels?
Replies: 5
Views: 6715

Re: How do I use a colour to mask out pixels?

I just realized my proposed ImageMagick parameter doesn't do exactly what I want, but you get the idea.
by dgpeters
2018-04-12T12:43:13-07:00
Forum: Users
Topic: How do I use a colour to mask out pixels?
Replies: 5
Views: 6715

Re: How do I use a colour to mask out pixels?

Here's how I translated that for macOS: magick qq.tiff \( -clone 0 -channel RG -separate +channel -threshold 90% \) \( -clone 0 -channel B -separate +channel -threshold 5% -negate \) -background None -compose Darken -layers Merge qq2.tiff I was getting all black output, but I trusted you, so I ...
by dgpeters
2018-04-12T00:51:41-07:00
Forum: Users
Topic: How do I use a colour to mask out pixels?
Replies: 5
Views: 6715

Re: How do I use a colour to mask out pixels?

Oh, and yellow must also have Blue <5%. I forgot that.
by dgpeters
2018-04-12T00:40:02-07:00
Forum: Users
Topic: How do I use a colour to mask out pixels?
Replies: 5
Views: 6715

How do I use a colour to mask out pixels?

I want to mask out (ie, blacken) any pixels that have any blue in them. This is not the same thing as removing blue pixels. I've tested dozens of commands but can't achieve that yet. I've spent hours in the documentation and searching with Google. Actually that's how I'm trying to solve my problem ...
by dgpeters
2018-03-30T00:56:46-07:00
Forum: Digital Image Processing
Topic: How do I remove solid colours if I don't know the colours in advance?
Replies: 9
Views: 212711

Re: How do I remove solid colours if I don't know the colours in advance?

It's sorta working now. It's giving me exactly what I specified, I believe, but perhaps not exactly what I wanted. For example now if my source image contains a solid black square on a solid white background, the result is an outline of a white square on a black background. I think I understand why ...
by dgpeters
2018-03-29T11:19:47-07:00
Forum: Digital Image Processing
Topic: How do I remove solid colours if I don't know the colours in advance?
Replies: 9
Views: 212711

Re: How do I remove solid colours if I don't know the colours in advance?

#!/bin/sh convert test.tiff alpha off -virtual-pixel Edge \( -clone 0 -morphology Convolve 2x1+0+0:1,-1 \) \( -clone 0 -morphology Convolve 1x2+0+0:1,-1 \) \( -clone 0 -morphology Convolve 2x1+1+0:1,-1 \) \( -clone 0 -morphology Convolve 1x2+0+1:1,-1 \) -delete 0 -evaluate Abs 0 -grayscale ...
by dgpeters
2018-03-27T07:20:25-07:00
Forum: Digital Image Processing
Topic: How do I remove solid colours if I don't know the colours in advance?
Replies: 9
Views: 212711

Re: How do I remove solid colours if I don't know the colours in advance?

The first thing I had to figure out was that I needed to put the escape character "\" before each parenthesis because I'm on macOS. The second thing I had to figure out was that it doesn't work on PNG files ("convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `test2.png ...
by dgpeters
2018-03-25T01:18:24-07:00
Forum: Digital Image Processing
Topic: How do I remove solid colours if I don't know the colours in advance?
Replies: 9
Views: 212711

Re: How do I remove solid colours if I don't know the colours in advance?

I appreciate the effort! If I can make this work I will use it a lot; I'll let you know.
by dgpeters
2018-03-24T13:29:55-07:00
Forum: Digital Image Processing
Topic: How do I remove solid colours if I don't know the colours in advance?
Replies: 9
Views: 212711

How do I remove solid colours if I don't know the colours in advance?

I have images which contain both gradients and perfectly solid colours. I want to convert the solid colours, by turning them to solid white. I found examples online which would work if the solid colours were known in advance, but I don't know that information in advance. I'm flexible on the ...
by dgpeters
2015-01-03T14:30:19-07:00
Forum: Users
Topic: Not properly installed on OS X
Replies: 3
Views: 9099

Re: Not properly installed on OS X

Is this the information you were asking me for? $ ls $HOME/ImageMagick-6.9.0 bin etc include lib share $ I noticed that BMP was in the list so for now I'm able to manipulate BMP files, which is useful for now. but still, can we make this work? I installed ImageMagick using a standard Mac OS X ...
by dgpeters
2015-01-03T14:12:44-07:00
Forum: Users
Topic: Not properly installed on OS X
Replies: 3
Views: 9099

Not properly installed on OS X

I installed ImageMagick 6.9.0 on my OS X Mavericks iMac (newest 5K model). After a few hours I realized I probably also needed to install XQuartz, so I did that too. And I rebooted. But ImageMagick still won't recognize any file I throw at it. Here's an example of what I get: $ export MAGICK_HOME ...
by dgpeters
2014-12-28T15:29:19-07:00
Forum: Users
Topic: Need to count how many pixels are MORE blue than red
Replies: 2
Views: 5777

Need to count how many pixels are MORE blue than red

I need to count how many pixels in an image (I would prefer the answer reduced to a RATIO from 0 to 1) are "MORE blue than yellow." I have a rectangle PNG file. So for example if the file contained 50% blue pixels and 50% green pixels, the result should be 0.5 since green is an equal amount of blue ...
by dgpeters
2013-09-29T20:08:12-07:00
Forum: Users
Topic: Trying to get a file's average brightness level
Replies: 3
Views: 7260

Re: Trying to get a file's average brightness level

How curious!! The first word of my last post (shown as "???"") was, I recall, just a 3-letter polite word of surprise starting with "W". I'm guessing it was censored. Sorry about that.
by dgpeters
2013-09-29T12:16:56-07:00
Forum: Users
Topic: I need a faster way to generate locations of white pixels
Replies: 2
Views: 3636

I need a faster way to generate locations of white pixels

I need to display the locations of all the white pixels in my monochrome PNG file (i.e., identify reports it as: trythis3.png PNG 769x550 769x550+0+0 8-bit sRGB 2c 6.14KB 0.000u 0:00.000 ). I've got something that works: " convert trythis3.png sparse-color:- | tr ' ' '\n' | grep white " but I find ...
by dgpeters
2013-09-29T11:54:03-07:00
Forum: Users
Topic: How do I filter out red, white, yellow - but keep the green?
Replies: 7
Views: 12154

Re: How do I filter out red, white, yellow - but keep the gr

I think you are the author of this wonderful utility so I must be extremely nice to you. Thanks for a superb utility. You asked me why I don't simply want the green. Because that produces false results - namely it also produces hits on yellow, white and anything else that includes green. But from ...