Search found 50 matches

by konstantin
2016-01-17T11:33:25-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

Maybe such a bisection / binary search method should be implemented in ImageMagick (similarly to Excel solver) to help maximize certain image properties. For example to find a gamma value against maximizing the black-white pixel transitions (edges) on the thresholded image, or simply find the thresh...
by konstantin
2016-01-16T11:47:20-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

Yes, in fact I need a cumulative histogram, but I had no clue that ImageMagick can provide it.
by konstantin
2016-01-16T10:41:37-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

"stabilized version": determined golden-ratio graylevel is averaged with graylevel got from the previous frame:
Image
by konstantin
2016-01-16T09:21:55-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

Yes, because I applied a slow motion effect too, to double the number of frames. Maybe when converting to gray colorspace for making such a B/W animation one should discard the chroma information of the image completely, am I right?
by konstantin
2016-01-16T07:08:19-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

And how can I get the histogram data from a jpg image grayscale equivalent without really converting it to a temporary image? I mean something like: convert input.jpg -colorspace gray -info:histogram BTW one can get good results by setting the ratio of black and white pixels to the golden ratio 1/1....
by konstantin
2016-01-16T06:54:32-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

Thx, it works, resulting image is very similar:
Image
by konstantin
2016-01-16T05:56:12-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

I see, the problem is that I have little knowledge in image processing and ImageMagick, but I can easily code in Ruby. For example for this image (after converting to gray colorspace) I get the following histogram: Histogram: 1: ( 1, 1, 1) #010101 gray(1) 18: ( 2, 2, 2) #020202 gray(2) 88: ( 3, 3, 3...
by konstantin
2016-01-16T05:08:32-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

Re: How to threshold an image to get about same amount of black and white?

Thx, but this doesn't work with jpg image. My input image currently is: http://i.imgur.com/7cXqWHe.jpg And I am using a Ruby script and a simple binary search algorithm ( https://en.wikipedia.org/wiki/Bisection_method )to find a gamma value, which can be pre-applied to the input image to achieve my ...
by konstantin
2016-01-16T03:50:54-07:00
Forum: Users
Topic: How to threshold an image to get about same amount of black and white?
Replies: 26
Views: 19954

How to threshold an image to get about same amount of black and white?

I would like to assemble an ImageMagick command line which convert an image to pure black and white colors by simply thresholding it: convert rose: -colorspace gray -ordered-dither threshold -colors 2 output.gif After issuing: identify -verbose output.gif Histogram: 2640: ( 0, 0, 0) #000000 gray(0) ...
by konstantin
2014-12-14T18:07:58-07:00
Forum: Users
Topic: Image compressibility metric?
Replies: 8
Views: 7716

Re: Image compressibility metric?

In fact I would mean the detailness or "business" of an image, but I assumed in the past that it is in connection with the compressibility, so I used the quality 2 jpeg file size as a metric for the image quality. Now I will try to use the entropy instead of. How can I get a measurement / ...
by konstantin
2014-12-14T17:36:33-07:00
Forum: Users
Topic: Image compressibility metric?
Replies: 8
Views: 7716

Re: Image compressibility metric?

Thx, it works, and quick enough.
by konstantin
2014-12-14T14:22:55-07:00
Forum: Users
Topic: Image compressibility metric?
Replies: 8
Views: 7716

Re: Image compressibility metric?

Sad to hear, I never used an API. Is it possible to use it with Ruby?
by konstantin
2014-12-14T13:18:35-07:00
Forum: Users
Topic: Image compressibility metric?
Replies: 8
Views: 7716

Re: Image compressibility metric?

Thx, compiling.
Is it possible to calculate only the entropy with the "identify" command? For speed reasons.