Detect edges of barcode with OpenCV in iOS - ios

I'm having the user capture an image of a barcode that they are asked to place inside a bounding box drawn on the camera overlay. I'd like to detect whether that barcode was properly placed in the box. What would be the best way to detect this? OpenCV's houghLines? And how would I figure out if the lines detected from houghLines are the barcode's corner and that they match up with the camera overlay's bounding box?
Thanks in advance for any help

The post How to find corners on a Image using OpenCv has the solution for your problem. I did the same for my project and it worked like a charm :) If need help in understanding or tuning the algorithm, don't hesitate.
Cheers

Related

opencv: how to detect semi-circle or semi-oval or semi-ellipse

Update:
The approach shown in this post: Detect semi-circle in opencv does not work in my case.
I appended the results.
Original:
I am using OpenCV to detect a semi-circle like shape.
My idea is to find contours first and do some analysis later. Then I got stuck here. What are the rules to check whether the contour is a semi-circle shape?
Or maybe I should try matchShapes? Or feature detection which I think is a little overweight for such a task.
Any suggestion is greatly appreciated!
Thanks
Deryk

how to detect known objects in OpenCV?

I am try to draw shapes in the window in real time. The shapes are like tangle ,rectangle ,circle , half or circle and "Z" in the screen using yellow color. The size and the shape may not be same to the original image. But Program know all the original shapes. Because they are predefined. I want to know how i can identify the correct shape. as an example,
is there possible way to do this? can I use template matching for this? Please help me with this..
You can use different methods to detect each shape. Check these:
Ellipse detection with OpenCV
Square detection doesn't find squares

Rotate face in image

I have a problem, when i take a photo with my tablet, i use opencv for detecting a face and recognition a face. So i would try to rotate the face in order to have for example the eyes and mounth in the same position for example all with the same horizontal angle.
Can you suggest me some OpenCv functions or some useful links for do this?
Thanks in advance.
Marco
I think the opencv remapping tutorial might help
http://opencv.itseez.com/doc/tutorials/imgproc/imgtrans/remap/remap.html#remap
Full answer:
Use this to locate the eyes cascade_classifier
now when you have a point for each eye - build the line equation and use simple trigonometry to find the angle. when you have the angle - use the remap to rotate or even better use this warp_affine

Normalize document captured from camera in OpenCV

I want to use a camera as a Document Scanner and I need to fix the distortion.
I have seen solutions that allow the user to point on the corners of the document, and they fix the distortion according the points.
I am trying to do that with OpenCV, but I cannot find a simple way to do that.
Can somebody show me how o do that with simple 4 corners of the document?
Thank's
Meir
I found the solution here: nuigroup.com/forums/viewthread/3414 that's exactly what I was looking for.

Object detection

I am trying to recognize the numbers on the 7-segment LCD display(like the digital watch), and first of all I want to 'draw' a bounding box to focus on the LCD screen to get rid of most of the background noise, but I am still not sure which method is suitable for this task. Can anyone help me?
I won't tell you the exact answer but as far as I can tell you should take a look at the OpenCV library. The keyword you're looking for in the first place is: Region Of Interest (ROI), ie. the bounding box.

Resources