Get Moments for all Contours and the mass centersĮlse if (mark = 1) B = i // i.e., A is already found, assign current contour to BĮlse if (mark = 2) C = i // i.e., A and B are already found, assign current contour to C Mark = 0 // Reset all detected marker count for this frame Qr_thres = Mat::zeros(100, 100, CV_8UC1) Ĭapture > image // Capture Image from Image InputĬvtColor(image, gray, CV_RGB2GRAY) // Convert Image captured from Image Input to GrayScaleĬanny(gray, edges, 100, 200, 3) // Apply Canny edge detection on the gray imageįindContours(edges, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE) While (key != 'q') // While loop to query for Image Input frame Int mark, A, B, C, top, right, bottom, median1, median2, outlier įloat AB, BC, CA, dist, slope, areat, arear, areab, large, padding Vector pointsseq //used to save the approximated sides of each contour Void cv_updateCornerOr(int orientation, vector IN, vector &OUT) īool getIntersectionPoint(Point2f a1, Point2f a2, Point2f b1, Point2f b2, Point2f& intersection) Void cv_updateCorner(Point2f P, Point2f ref, float& baseline, Point2f& corner) Void cv_getVertices(vector > contours, int c_id, float slope, vector& X) According to you where is the problem?įloat cv_distance(Point2f P, Point2f Q) // Get Distance between two pointsįloat cv_lineEquation(Point2f L, Point2f M, Point2f J) // Perpendicular Distance of a Point J from line formed by Points L and M Solution to equation of the line Val = ax+by+cįloat cv_lineSlope(Point2f L, Point2f M, int& alignement) // Slope of a line by two Points L and M on it Slope of line, S = (x1 -x2) / (y1- y2) I believe that the problem is some parameters, but i can't find it. The problem is that the code is able to recognize only the qr codes well visible, while the qr codes that it must recognize are blurred. if the effect you applied is good but the colors are too intense, you can simply alter the colors in the color settings.I'm trying to extrapolate from a video stream, some QR codes that have been modified to not be easily recognizable.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |