Edge Detection

My Edge detection program involves defining the edge of a section of an image based purely on its colour (RGB value).

In building a Risk Style game I needed to be able to find out what country a player has clicked efficiently on a very large scale on a 4k image.

Please see below for more details and a slowed down demonstration example of this EdgeDetection Class.

 

 

Description

I need to find all the border pixels in respect of a map to be able to add these to a Database for a quick-lookup .

When a point was clicked on a map the program had to determine the internal border of the country it was in.

To do this i created a small Edge Detection class, that given an Image and a starting point it would return a stack of the Point objects, this was to be used for another separate program later.

It took a fair while to design the program to be able to work its way successfully around an irregular shape.

 

 

 

My method of trying to negotiate around pixels was flawed until I used a buffer of sorts by pre-loading the stack with a full set of directions.

 

 

Try It!

 

Language used

 

 

 


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *