Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Thanks to Instagram for posting this interesting challenge. This gave me an opportunity to get started with image processing. Went to landmark, sat there for 3 hours and read some of the related chapters from DIP by Gonzalez & Woods. The first part is done! (Assuming a strip width of 32) Here's how I worked out my solution : DISCLAIMER : I only read those chapters on connectivity, adjacency, distance! My solution is based only within this domain! Assumption (That turned out to be right): Two strips that are close must have almost similar pixel colors. So basicaly match strips.  For each strip find its "best" neighbour-strip, i.e, a strip that as almost similar pixel colors.  To accomplish this, I used a simple scoring mechanism  I computed the euclidean distance between them for each color-range. Did some heuristics to arrive at the value 8.  If score higher, update the highest score. (The usual way of scoring)  From right to left, repeat the same process on the input and paste the chosen strips to the output image. Please do let me know if you have a better way to solve this. I am ready to expand my knowledge on Image Processing ;-)