Wednesday, 4 June 2014

Object Recognition in MATLAB

Recently, I was working in a conveyor belt setup, where, a camera was used to recognize the objects in the belt and an actuator to eject the unwanted objects. As I always like to simulate the algorithm before an actual implementation, I have used MATLAB for image recognition and based on the object classification made by MATLAB, the actuator will be actuated (to eject unwanted objects).

For simulation purpose, I have established serial communication between MATLAB and Proteus ISIS ( where I can have microcontroller, LEDs, Actuators etc). I have used a microcontroller of my choice and enabled its serial receive pin, so that it can receive the data that MATLAB transmits. MATLAB recognizes a known object by matching its SURF features and serially transmit a unique character/integer for each object. The microcontroller is coded in such a way that, if a specific character/integer is found in the receive buffer, then the actuator will be actuated.

Below shown is a simulated video of a conveyor belt setup. The video was taken using a 2MP cellphone camera. LEDs were interfaced with the microcontroller in Proteus ISIS to check the image recognition algorithm developed in MATLAB ( Every object has its own LED interfaced). Microcontroller coding was done in Keil and the .hex file is dumped into the simulated microcontroller in Proteus ISIS.

The detection algorithm was a bit slow in the video used. However, with the use of Bluecougar-X-X120aG GigE camera, improvement in detection speed was observed. In addition to this, I have also tested the similar object recognition algorithm in OpenCV. By my experience in working with both MATLAB and OpenCV, the detection speed is remarkably high in OpenCV when compared to MATLAB


No comments:

Post a Comment