Search found 12 matches

by troller
2014-10-06T08:17:08-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Re: Formula to insert a red cross if there are color pixels

I am using IM 6.8.8-9 Q16 64 bit on Windows 7. The code I am using now is: :loop @echo off cd "C:\4300 Results\Screenshot\" for /F "usebackq" %%L in (`convert ^ Screenshot.jpg -fuzz 1%% +transparent blue ^ sparse-color:`) do set RED_PX=%%L if not "RED_PX"=="" composite ^ -geometry +94+36 "C:\4300 ...
by troller
2014-10-05T09:01:07-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Re: Formula to insert a red cross if there are color pixels

Thanks,
but it seems that no matter what color I choose as condition, it will always run the command -> merge the two pictures, even if I chose a color that does not even exist in the picture.

Andrea
by troller
2014-10-03T05:31:36-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Re: Formula to insert a red cross if there are color pixels

What I have now very simply is this: composite -geometry +1325+30 scartologo.bmp Screenshot.jpg Final.jpg The pictures "scartologo" and "screenshot" are already saved in the folder. I just need to create a trigger to do this line; otherwise, this line is just skipped in the overall program. Thanks ...
by troller
2014-10-03T04:50:28-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Re: Formula to insert a red cross if there are color pixels

I am using Windows, Batch file.

Yes actually I'm not very good at all in scripting and compiling.
by troller
2014-10-03T03:41:27-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Re: Formula to insert a red cross if there are color pixels

1) You could make non-red pixels transparent, and see if "sparse-colors:" emits anything. If it does, you have at least one red pixel. convert in.jpg -fuzz 15% +transparent red sparse-color: 2) You could use "-draw". The rest is merely scripting. Thanks but how do I automate that I create the red ...
by troller
2014-10-03T03:04:13-07:00
Forum: Users
Topic: Formula to insert a red cross if there are color pixels
Replies: 10
Views: 4633

Formula to insert a red cross if there are color pixels

Hello all. I am trying to figure out a quick way to do this: I have a series of images (1920x1080 pixels each) that contain a set of green, yellow and sometimes also red dots. Each dot is a circle with a diameter of roughly 15-16 pixels. I would like to write a formula/script that does this: 1) It ...
by troller
2014-05-04T11:43:24-07:00
Forum: Users
Topic: Cannot use a FOR LOOP on a batch file
Replies: 1
Views: 3799

Cannot use a FOR LOOP on a batch file

Hi everybody! I have a batch file (MS-DOS) containing inside multiple FOR LOOPS with variables %%a or equivalent and strings like this: for /F "usebackq tokens=1,2 delims=,:" %%X ^ in (`%IM%convert convert RPS.bmp txt:^|find "%colorRPS%"`) ^ do ( set /A sigXRPS+=%%X set /A sigYRPS+=%%Y set /A ...
by troller
2014-04-30T03:05:04-07:00
Forum: Users
Topic: Cannot find correct new oordinates of a rotated image!!
Replies: 9
Views: 8714

Re: Cannot find correct new oordinates of a rotated image!!

Ok thanks for the clarification. So it seems that even if I don't want to use offsets, they just exist and appear... It seems from this method that I have to manually look for the parameters using -verbose:info and then write them in the code for the new coordinates calculation, both the Tx, Ty and ...
by troller
2014-04-28T16:27:02-07:00
Forum: Users
Topic: Cannot find correct new oordinates of a rotated image!!
Replies: 9
Views: 8714

Re: Cannot find correct new oordinates of a rotated image!!

snibgo wrote:With my command, you'll see the top-left of the rectangle has stayed at (0,0).
That is exactly what I would not want. I want to have in 0,0 the top-left of the whole new image, which will be on the white background "behind" the rotated rectangle.
by troller
2014-04-28T15:05:17-07:00
Forum: Users
Topic: Cannot find correct new oordinates of a rotated image!!
Replies: 9
Views: 8714

Re: Cannot find correct new oordinates of a rotated image!!

using tx and ty at zero, I do not get the correct new pixel positions that I want. tx=ty=Zero would be fine if you were rotating about (0,0). But you are not. The default centre of rotation is the center of the image. If you want to rotate about (0,0) then: convert -size 400x300 xc:green -virtual ...
by troller
2014-04-28T14:17:26-07:00
Forum: Users
Topic: Cannot find correct new oordinates of a rotated image!!
Replies: 9
Views: 8714

Cannot find correct new oordinates of a rotated image!!

Hi everybody, I'm having some quite of struggling here since last friday... Let's assume I have a picture that is a green rectangle of 400x300 pixels, and the position of the top-left corner pixel is of course 0,0, and the bottom right is 399,299. Now with imagemagick, using either -rotate or ...
by troller
2014-04-22T07:53:32-07:00
Forum: Users
Topic: select region that has similar color
Replies: 27
Views: 74943

Re: select region that has similar color

Hello Fred! I have been looking at this post of yours and the code you have written here below (for finding the central point of a circle) is what i was trying to do, and have been unsuccessful, for quite some time now. I am working usually on Windows DOS (shell), but I could not find any way of ...