What’s the use of Canny before HoughLines (opencv)?

Short Answer cvCanny is used to detect Edges, as well as increase contrast and remove image noise. HoughLines which uses the Hough Transform is used to determine whether those edges are lines or not. Hough Transform requires edges to be detected well in order to be efficient and provide meaning results. Long Answer The Limitations … Read more

Image Processing – Implementing Sobel Filter

It’s pretty easy, you just need to convolve your image with a Sobel filter. A Sobel filter has two kernels, x-direction kernel and y-direction kernel. The x-direction kernel detects horizontal edges, and y-direction kernels detects vertical edges. x-direction kernel (the size is 3×3) float kernelx[3][3] = {{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}; … Read more

Image segmentation based on edge pixel map [closed]

Very nice work on boundary detection. I used to work on similar segmentation problems. Theory: Once you obtained your edge map where e(i,j) indicates the “edge-iness” degree of pixel i,j you would like a segmentation of the image that would respect the edge map as possible. In order to formulate this “respect the edge map” … Read more

Why Sobel operator looks that way?

In computer vision, there’s very often no perfect, universal way of doing something. Most often, we just try an operator, see its results and check whether they fit our needs. It’s true for gradient computation too: Sobel operator is one of many ways of computing an image gradient, which has proved its usefulness in many … Read more

OpenCV Edge/Border detection based on color

Color information is often handled by conversion to HSV color space which handles “color” directly instead of dividing color into R/G/B components which makes it easier to handle same colors with different brightness etc. if you convert your image to HSV you’ll get this: cv::Mat hsv; cv::cvtColor(input,hsv,CV_BGR2HSV); std::vector<cv::Mat> channels; cv::split(hsv, channels); cv::Mat H = channels[0]; … Read more

Sobel filter kernel of large size

Complete solution for arbitrary Sobel kernel sizes and angles tl;dr: skip down to section ‘Examples’ To add another solution, expanding on this document (it’s not particularly high quality, but it shows some usable graphics and matrices starting at the bottom of page 2). Goal What we’re trying to do is estimate the local gradient of … Read more

Algorithm to detect corners of paper sheet in photo

I’m Martin’s friend who was working on this earlier this year. This was my first ever coding project, and kinda ended in a bit of a rush, so the code needs some errr…decoding… I’ll give a few tips from what I’ve seen you doing already, and then sort my code on my day off tomorrow. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)