We have always been very interested in both the software and hardware components of security. We found it interesting that our friends were overly cautious about their passwords but were very apathetic when it came to their physical keys. We sought to code this piece of software in order to demonstrate one of the flaws of physical security.

What it does

Our project takes a single image of a key and analyzes its profile in order to precisely determine what type of key it is. Using OpenCV, we process the image and extract the shape and bitting of the key. We then output this information to OpenSCAD and generate an .stl file that is ready to be 3D printed.

How we built it

We started by applying some filters to our image that allowed us to better detect edges and corners. We then applied an edge detection algorithm and, after some processing, extracted the profile of the key. After obtaining the profile, we then used reference measurements in order to establish a coordinate system and measure the bitting. Finally, we exported the bitting to 3D models written in OpenSCAD and generated an .stl file that is ready to print.

Challenges we ran into

The challenges we ran into included properly filtering the input image in order to optimize the available information, effectively measuring very small distances using a phone camera, processing the measurement data and installing OpenCV.

Accomplishments that we're proud of

We're proud that it works flawlessly, even though we had no prior experience in computer vision.

What we learned

We learned how to analyze and manipulate images and video streams in order to extract useful information from them.

What's next for keypic

We are looking to implement more types of keys and expand our research to other types of physical security.

Built With

Share this project: