Hot answers tagged

22

One important thing to understand is that after extracting the keypoints, you only obtain information about their position, and sometimes their coverage area (usually approximated by a circle or ellipse) in the image. While the information about keypoint position might sometimes be useful, it does not say much about the keypoints themselves. Depending on ...


11

As suggested above, the Matlab Canny edge detector calculates the gradient using a "derivative of a Gaussian filter" (as stated in the documentation). In other words, Matlab does a Gaussian blur of the image and then finds the gradient of that smoothed image... all using a single fancy filter. [If you want to know the details, just type in edit edge as ...


11

Are there any other objects that can move beside people? If there aren't, you can just find the blobs (connected components) in your foreground mask, and these are your people. They can also "collide" one with another, creating one blob instead of two. In this case, you can do a motion tracking and resolve the ambiguity by using the fact that the ...


9

I think what you are asking is about the feasibility of your pedestrian algorithm. There are two general strategies for this kind of problems: (bottom-to-top) Consider it as a pure detection problem, where in each frame you detect only pedestrians. Once you detect them, a) counting their number in a frame is fairly easy; and b) tracking any of them in ...


9

A first attempt using Matlab: im = imread('squares.jpg'); im2 = rgb2gray(im); se = strel('disk', 15); for i = 1:16; t = 60+i*5; % try out a range of bw thresholds to see what works best labelled = bwlabel(im2>t); % label regions in the BW image closed = imclose(labelled, se); % close small regions cleared = imclearborder(~closed,4); % ...


8

I can see a number of possible problems with this approach. I speak from my own experience here from improving a pedestrian counting system with a very similar approach, so I don't mean to be discouraging. On the contrary, I'd like to warn you of possible hurdles you may have to overcome in order to build an accurate and robust system. Firstly, background ...


8

I have been in the "in order to use well tested methods I would need an extensive database of examples which I don't have" position in a very small company that "couldn't afford it". I regret very much that I didn't simply do whatever was necessary to get as much such data as possible. I think it would have made a world of difference to them in the end. Any ...


8

I decided to post this answer here because a while back, this came up as the top result in Google and its suggestions helped me. So I decided to share my experience too. Having spent countless hours trying to get the best stereo calibration on a Kinect, I shared my tips and findings in a blog post here. Although it is geared towards stereo calibration and ...


8

I had tried something else to improve my result in question. Below solution is on the assumption that first square(orange) is always detected in step 1. And it is practical due to its high contrast color compare to background. Even the result I showed in question has detected it correctly Step 1 : Find as many squares possible I split the image to R,G,B,H,...


8

You can simply specify a ROI for that region and convert it into HSV. For eg (below is pseudo-code in Python-OpenCV) # define ROI of RGB image 'img' roi = img[r1:r2, c1:c2] # convert it into HSV hsv = cv2.cvtColor(roi,cv2.COLOR_BGR2HSV) Now it gives you the hsv values of the region. But one or two difficulties there: Your object may comprise some part ...


8

Laplace of Gaussian The Laplace of Gaussian (LoG) of image $f$ can be written as $$ \nabla^2 (f * g) = f * \nabla^2 g $$ with $g$ the Gaussian kernel and $*$ the convolution. That is, the Laplace of the image smoothed by a Gaussian kernel is identical to the image convolved with the Laplace of the Gaussian kernel. This convolution can be further expanded, ...


7

I am not giving you a complete algorithm here, but since I worked on a similar project, I can give you some hints and tips. First of all, changing an image taken from one perspective to a different one relatively easy only for planar surfaces. E.g., you have an image of a tall building with a road, and since buildings are usually build vertical in the air ...


7

Here is the link to a research paper that tries to do the same thing as you wanted. It might help you.using image features Also a cool video on the youtube


7

Harris Corner detector tries to quantify the local intensity changes at all the directions for each pixel. The figure below illustrates the basic idea clearly: So $I(x+u,y+v)$ indicates the pixel intensities of all the neighborhood pixels around $(x,y)$. The window function is applied for feature localization. For most often used Gaussian function, the ...


7

Use bilateral filter or anisotropic diffusion first. The effect of anisotropic diffusion is as the following: . The MATLAB code can be found here. Here is its effect on your image: Finally, non-local means is a also a good way to get rid of the noise. You might also want to take a look into that. I warn you though, it is slow.


7

In general, this is an image segmentation problem (http://en.wikipedia.org/wiki/Image_segmentation) into which you would be trying to isolate the focused to the non-focused regions of the image. Optical lenses are equivalent to low pass filters anyway and the effect of a low pass filter on a signal is to smooth it out by limiting the higher frequency ...


6

One simple way for quantification of contract that I can think of is through use of image histogram. Following is my suggestion Compute Histogram of the Image From the counts compute entropy If you just want to try it out you can use the matlab inbuilt function http://www.mathworks.ch/ch/help/images/ref/entropy.html You can use the entropy value of the ...


6

Here is a list of 'best practices' for camera calibration which I originally posted here: https://calib.io/blogs/knowledge-base/calibration-best-practices Choose the right size calibration target. Large enough to properly constrain parameters. Preferably it should cover approx. half of the total area when seen fronto-parallel in the camera images. Perform ...


6

I think that you can solve you problem in a much easier way. Considering that you are dealing with blueprints, you should not worry about edge connectivity, noise, and many other things that SIFT and SURF were built to accommodate for. Your template is a hollow shape with specific edge shapes. Thus, My recommendation is: Walk around the perimeter and find ...


6

1st Approach: Use the haartraining methods of opencv according to this tutorial http://note.sonots.com/SciSoftware/haartraining.html -- this should give the best results, but I haven't worked with haartraining myself so far... 2nd Approach: I would suggest to use methods of "markerless tracking" of the individual tiles of the board. You can implement this ...


6

Here are a few ideas: First convert from color to grayscale. It looks like you have fairly good contrast already. There are various methods to perform this conversion; choose the simplest at first: gray = (red + green + blue)/3. Quite often you don't need anything better than that. For some applications, using just the green color plane is sufficient. If ...


6

Intuition for parameters of HoughCircles: image: 8-bit, single channel image. If working with a color image, convert to grayscale first. method: Defines the method to detect circles in images. Currently, the only implemented method is cv2.HOUGH_GRADIENT, which corresponds to the Yuen et al. paper. dp: Resolution of the accumulator array. Votes cast are ...


6

Parallel lines in the image do intersect at a vanishing point. Therefore simply hypothesizing lines (a gradient direction at a point suffices to describe it) and voting (see Hough voting) would suffice to identify this point. One could then record all the lines that casted votes to this very point and identify them. Care must be taken as it is difficult to ...


5

Step 1: Whatever final binary image you are getting from analyzing in B,G,R,H,S,V plane, in that image do a blob counting algorithm. Step 2: Find the largest blob on basis of area or contour length. Since your blobs will be mostly parallelogram types so area or contour, any one will do. Step 3: With the largest blob (since largest blob is the best blob ...


5

Note: This method is going to be really slow. Generate a mask that looks like the contours of a ideal object. Similar to this: then slide (position,scale,rotation) the mask over the image and match it with the contour of the real image (perhaps blurred a bit to get softer response) to calculate how similar they are, the (position,scale,rotation) with the ...


5

I asked Google again for you, but I did manage to find some hits in the end. There is already a very good question on stackoverflow concerning the exact same thing you are interested in. There is a very nice explanation of split-and-merge provided in one of the answers, as well as simplified pseudocode. The other answer provides a link to the ...


5

Finding shapes / lines is a good idea. Threshold tweaking is almost certainly a bad idea. Hough transform typically expects your lines to be (1) in a binary image and (2) of one pixel width. Try to apply an edge detector (Matlab: edge) on your filtered image in order to get the boundaries of your white regions as one-pixel lines. Then Hough transform should ...


5

What has been suggested to you is called template matching. If you don't mind re-using code (and working with C++), you can find an implementation in the OpenCV library. A simpler alternative (that I would start with) would be to work with generalized Hough transform, but that will require some pre-processing first by detecting the edges in the image.


5

Do not struggle forming a database of images to match via descriptors. This would be too computationally cumbersome and would require immerse amount of training. Such a scalable solution doesn't exist out of the box yet. I would rather rely on Neural Networks or SVMs to train the possible appearances of characters. Of course using a classifier relies on ...


5

If I understand correctly, you don't need the intrinsics or extrinsics to achieve that, if a top-down view is all you want. You could basically define 4 points on your parallel lines and then warp the entire image into a canonical view (say $\{\{0,0\}, \{480,960\}\}$). To do that in OpenCV, all you need to do is compute the homography using findHomography ...


Only top voted, non community-wiki answers of a minimum length are eligible