Search found 10 matches

by andienz
2011-03-15T04:15:30-07:00
Forum: Users
Topic: crop to largest area of a given color
Replies: 8
Views: 19771

Re: crop to largest area of a given color

Awesome! Thanks for your ideas!

Anthony, is there a way to get the bounding box coordinates of the largest area, instead of the center of the largest area or inscribed rectangle?

Andi
by andienz
2011-03-14T19:50:49-07:00
Forum: Users
Topic: crop to largest area of a given color
Replies: 8
Views: 19771

Re: crop to largest area of a given color

I just found this post: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11705 It already jogged my mind towards a solution. I actually can determine a point on the image where I'll use -floodfill to isolate the color area I'm after. This actually works perfectly in my application ...
by andienz
2011-03-14T19:21:56-07:00
Forum: Users
Topic: crop to largest area of a given color
Replies: 8
Views: 19771

crop to largest area of a given color

Hi! I need some help to brainstorm this little problem. I'm working on a little project where I need to draw a box around the largest area of a certain color in an image. I'm currently using +opaque and -fuzz to single out the color and then use -trim with - info in order to get the coordinates for ...
by andienz
2010-09-20T14:51:30-07:00
Forum: Users
Topic: detect fully black images
Replies: 2
Views: 13382

detect fully black images

Hi!

I need to weed through thausands of pictures and get rid of the ones that only have black pixels.
What is the fastest way to detect images that contain nothing else but black. grb 0,0,0.
The Key word is fast.

I'm using ImageMagick 6.6.4-4 2010-09-17 Q8 with cygwin
Any suggestions?

Thanks!

Andi
by andienz
2010-09-15T10:30:04-07:00
Forum: Users
Topic: need xy coordinate of blob center
Replies: 6
Views: 15556

Re: need xy coordinate of blob center

Reading the -trim manual I found this: convert trimtest.png info:- trimtest.png PNG 25x19 2400x400+14+14 DirectClass 16-bit I'll just use a combination of grep and awk to get the values pushed into single variables. This gives me exactly what I need. I quickly can calculate the center of the found ...
by andienz
2010-09-15T09:57:13-07:00
Forum: Users
Topic: need xy coordinate of blob center
Replies: 6
Views: 15556

Re: need xy coordinate of blob center

The aproxximate center using the trim method could actually work for me. Only one tiny problem. I described this probably a little misleading. I need the center/middle of the blob in reference to the original much larger picture. I'm trying to measure the location of the blob within the original ...
by andienz
2010-09-15T07:05:39-07:00
Forum: Users
Topic: How to count number of pixels of a particular color
Replies: 13
Views: 63239

Re: How to count number of pixels of a particular color

Thanks for your help! My installation of IM is 6.4.0 01/19/10. I'll get a new workstation to work with soon and I'll wait with a new installation until then. For now I found a good workaround by just dumping the complete histogram with the pixel counts into a temporary file and then and using cat ...
by andienz
2010-09-15T06:53:30-07:00
Forum: Users
Topic: need xy coordinate of blob center
Replies: 6
Views: 15556

need xy coordinate of blob center

Hi! I have a black image with a white blob somewhere. I would like to get the average "center" of the of the blob in xy coordinated. It could also happen that the blob is interrupted with blackness cutting it in two or several portions. In other words, is there a fast way to get the coordinates of ...
by andienz
2010-09-10T05:55:01-07:00
Forum: Users
Topic: How to count number of pixels of a particular color
Replies: 13
Views: 63239

Re: How to count number of pixels of a particular color

anthony, Version: ImageMagick 6.4.0 01/19/10 Q16 http://www.imagemagick.org Full command line: convert Cylinder.png -fill black +opaque "rgb(255,0,0)" -fill white -opaque "rgb(255,0,0)" -format "%[fx:w*h*mean]" info: Results in: convert: unable to open image `rgb(255,0,0)': No such file or directory ...
by andienz
2010-09-09T15:43:01-07:00
Forum: Users
Topic: How to count number of pixels of a particular color
Replies: 13
Views: 63239

Re: How to count number of pixels of a particular color

Can someone help me how to sucessfully use the solution described above into a cygwin bash script? As soon as I'm using +opaque it thinks the next color is a file name. Error message: convert: unable to open image `rgb(255,0,0)': No such file or directory. Also the %[fx:w*h*mean]" makes some ...