Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Forum
Search
Topic Image points detection By asmodean Date 2013-03-10 15:00
Wait a moment, your second formula is wrong. Let's say we have height 30 and width 10 so the diagonal is about 32, then the radius about 16.. But with your formula the radius is 21. This *1.4 works only for square, not for rectangle.
Topic Image points detection By asmodean Date 2013-03-10 14:28
At the beginning I will do what you said, but lately I will have to change this, because the circle built in your way won't be the optimal circle... if I cut the images in that way, it will be better just to use rectangle for the collision detection. Let't say we have 5 width and 5 height, then my circle will have about 7 diameter. But if the object is sphere then the optimal diameter will be 5, no 7.
Topic Image points detection By asmodean Date 2013-03-10 11:33
Thank you guys, this is what I am looking for. Actually I knew about these decisions but I wasn't sure if i can use them. I was hoping to find ready function about this what I want, but now when I know that it can be done my problem is solved. :)
Topic Image points detection By asmodean Date 2013-03-09 21:24
Actually i want to find subimage's farthest points and use their distance as diameter. The image has some background and unit drawn over the background. I want to find the radius of the circle around the unit, not around the image.Is there any way to do this with some gem or i have to use some other tool to find these points?
Topic Image points detection By asmodean Date 2013-03-09 20:16
But I don't have the positions of the farthest points. How to find them?
Topic Image points detection By asmodean Date 2013-03-09 19:23
Hi, guys. I am newbie with gosu  and game development. I am making game with ruby and I want to make some collision detection. So I thought i can build optimal circle around an object into image. The image has black or transparent background and i have to find the distance between the farthest points of the object. Any suggestions? I thought i can save the image into bitmap and iterate trough the array and find these points but i can't do this with gosu.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill