My basic question is whether my idea is realizable, for known issues of slow txt:- command, and whether is it possible to list coordinates of missing pixels.
I would like to create binary mask. Only white pixels could be needed. What I want to do, is a grid like a chessboard, which bear "names" of images existing in my directory. These image I am going to join together into bigger images. The binary mask tells to a program, where starts one group of images, and where ends. I could do it in two colors, e.g. red and white. Because if there would be 100x100 pixels, divided by 10x10 squares (red,white,red,white,red,white,red,white,red,white), so it has bigger size than (empty,white,empty,white,empty,white,empty,white,empty,white). But now comes my question. If the area is empty, it does not mean, there is not information. It is also information of file names. For example, image position
17480,11032 refers to image 17480_11032, image position 17481,11032 refers to image 17481_11032, 17480,11033 refers to image 17480_11033, image position 17481,11033 refers to image 17481_11033, this is first quadrant, which is empty .
I tried this example, but with errors:
Code: Select all
convert -size 100x100 -page 17580x11132+17480x11032 xc:none ^
-stroke white ^
-draw "point 17482,11034" -draw "point 17483,11034" ^
-draw "point 17482,11035" -draw "point 17483,11035" ^
metadata.gif
Code: Select all
convert -size 100x100 -page 17580x11132+17480x11032 xc:none ^
-stroke white ^
-draw "point 17482,11034" -draw "point 17483,11034" ^
-draw "point 17482,11035" -draw "point 17483,11035" ^
txt:-
15,1: ( 0, 0, 0, 0) #0000000000000000 none
I would need to print only the pixels in the image size starting from 17480x11032.
It is absurd, that it tries to print whole image even it almost contains no pixels. Can you help?
I have more scenarios:
1) to print only empty pixels inside the image size (100x100 pixels)
- I need only coordinates
- no color information, that could speed it up
2) to print only white pixels inside the image size (100x100 pixels)
- I need only coordinates)
- no color information, that could speed it up
3) to all pixels in image size (100x100 pixels)
- I need only coordinates
- I need to recognize whether it is empty or white, but I would like to shorten the output as possible to speed up the pass into CMD.
I am fascinated by this benefit from IM, the fact, that image can bear information like a database to be used by external program.