Search found 7 matches
- 2014-07-12T04:00:49-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
Thanks a lot for the quick implementation and the information fmw42! However, I can't get your script to work in my environment. I get to following errors with the original image: $ separate -m 5 -v -t -l image_close_open_1d.png tmp.png numimages=5 convert.im6: geometry does not contain image ...
- 2014-07-11T14:52:13-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
I don't know if I'm supposed to post this here, but I ended up getting the coordinates with OpenCV and python after creating the shapes with ImageMagick: import numpy as np import cv2 im = cv2.imread("input.png") contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE ...
- 2014-07-11T10:30:25-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
Black pixels within white create problems for my "morphology skeleton and line-end reduction" suggestion, but my other suggestions are okay. Small groups of white within black, or even single white pixels, are, of course, shapes in their own right. I think if I expand the white pixels slightly that ...
- 2014-07-11T09:50:14-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
How urgent is this? I might be able to add that feature to separate when I can get to it, if it looks feasible and easy to do. Can you post a link to an example image you are using, so I can see what your situation might be. Do you need the separate image also or just the "center" coords? It's not ...
- 2014-07-11T09:23:52-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
What kind of "center" did you have in mind? Also did you want these centers relative to the bounding box of each extracted image or relative to the top left corner of the original image? I guess the optimal center would be the point farthest away from each edge and needs to be relative to the top ...
- 2014-07-11T09:15:37-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Re: Get center coordinates of object
Thanks for the tips! I'm running ImageMagick version 6.7.7-10 on Ubuntu, so I'll be sure to check out your script fmw42
- 2014-07-11T01:38:53-07:00
- Forum: Users
- Topic: Get center coordinates of object
- Replies: 18
- Views: 15416
Get center coordinates of object
Hi, I can get the coordinates of all pixels that differ between two images using the following command: convert image1.png image2.png -compose difference -composite -colorspace gray -threshold 0 txt:- This returns the list with coordinates and these coordinates together form several shapes in the ...