The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Tag Info

Hot answers tagged image

39

Convolution is correlation with the filter rotated 180 degrees. This makes no difference, if the filter is symmetric, like a Gaussian, or a Laplacian. But it makes a whole lot of difference, when the filter is not symmetric, like a derivative. The reason we need convolution is that it is associative, while correlation, in general, is not. To see why this ...

23

A filter F is called "linear", iff for any scalars $c_1$, $c_2$ and any images $I_1$ and $I_2$: $F\left(c_1\cdot I_1+c_2\cdot I_2\right)=c_1\cdot F\left(I_1\right)+c_2\cdot F\left(I_2\right)$ This includes: Derivatives Integrals Fourier transform Z-Transform Geometric transformations (rotate, translate, scale, warp) Convolution and Correlation the ...

22

Similar to one dimensional signals, low frequencies in images mean pixel values that are changing slowly over space, while high frequency content means pixel values that are rapidly changing in space. For example, the following image has strong low frequency components: You can intuitively see how I simply have a sin-wave propagating at some low frequency. ...

15

Will you please explain 2D haar discrete wavelet transform and inverse DWT in a simple language It is useful to think of the wavelet transform in terms of the Discrete Fourier Transform (for a number of reasons, please see below). In the Fourier Transform, you decompose a signal into a series of orthogonal trigonometric functions (cos and sin). It is ...

15

If you object has 6 known points (known 3D coordinates, $X, Y$ and $Z$) you can compute the location of the camera related to the objects coordinate system. First some basics. Homogenous coordinate is vector presentation of euclidean coordinate $(X,Y,Z)$ in which we have appended so called scale factor $\omega$ such that the homogenous coordinate is $\... 12 Since you are trying to discover structure in the images it's better to work in grayscale. This is a very nice case where the court appears to be a nice rectangle, but in general, courts might come in different sizes and orientations. Also, white lines on green background is not a general rule, consider for example Roland Garos. Having said this, you can ... 12 It depends how you define the term "information" or "entropy". The conventional definition of entropy of an image is to think an image as a two dimensional matrix of pixel and $$H = - \sum_k p_k \log_2(p_k)$$ where$p_k$is the probability, which is calculated from histogram, associated with gray level$k$. This kind of entropy is correct if we ignore the ... 12 If I understand your method 1 correctly, with it, if you used a circularly symmetrical region and did the rotation about the center of the region, you would eliminate the region's dependency on the rotation angle and get a more fair comparison by the merit function between different rotation angles. I will suggest a method that is essentially equivalent to ... 11 This is an extremely difficult task, one which is a very active line of research. I've managed to find a semi-recent paper on the subject. I won't go into the details, but here's a few things that this paper found that can be used. Textures: If you see a given texture, they can help you figure out how far something is away. The wood texture here would be ... 11 The lossless JPEG compression does not merely remove small coefficients in higher frequencies. It encodes them with a precision relative to a (relatively crude) visual perception model; most notably, horizontal and vertical frequencies are not quantized with the same precision. And as in many compression formats, it essentially assumes that the data is ... 10 There is a code on Matlab Fileexchange that is relevant to your problem: http://www.mathworks.com/matlabcentral/fileexchange/28155-inscribedrectangle/content/html/Inscribed_Rectangle_demo.html Update I wrote this tutorial article on computing largest inscribed rectangles based on the above link from Atul Ingle. The algorithm first searches for largest ... 10 One-dimensional version The one-dimensional version that you list won't work. When there is a large enough shift in images (more than one or two pixels in real-world images), there will be nothing relating the column pixels. For an example of this, try: I5 = rand(100,100)*255; I6 = zeros(100,100); I6(11:100,22:100) = I5(1:90,1:79); So that we have I5: ... 10 The DC term is the 0 Hz term and is equivalent to the average of all the samples in the window (hence it's always purely real for a real signal). The terminology does indeed come from AC/DC electricity - all the non-zero bins correspond to non-zero frequencies, i.e. "AC components" in an electrical context, whereas the zero bin corresponds to a fixed value, ... 9 While there are some obvious exception to it ("static" pattern on a television screen, the "dark frame" noise pattern of a camera), images are rarely generated by random processes. Declaring that an image is drawn from such or such distribution or generated by such or such random process is just a post-hoc modeling decision, and there is no "ground truth" to ... 8 Recall that the Watershed transform treats its input as a topographic map, and simulates flooding that topography with water. The "catchment basins" or "Watershed regions" are then the parts of the map which "hold water" without spilling into other regions. The gradient magnitude is a poor segmentation function as-is; the noise and open contours lead to an ... 8 This is not a complete and crisp answer however, i am leaving you with at least some approach for you to fight with. (I would be very glad to know if you have results). Take a look at these questions: Removing Glare from Image How to remove the glare and brightness in an image (Image preprocessing)? They are essentially trying to solve the same problem. ... 8 The sample image you posted has relatively strong perspective (it is not imaged straight from the direction of surface normal) which can cause problems with template matching techniques witch use block processing. I assume that you have to take the image with strong perspective so first thing we want to do is estimate image transformation which will remove ... 8 I started writing this before the answer from @A_A, but that answer is excellent. Still I hope the following might add a little to your understanding. The discussion about wavelets and so on falls into the general discussion about basis decomposition of signals. By this, we mean that we can represent our signal$\mathbf{x}\$ as the product of some basis ...

8

The appeal of this image is obviously in the numerous lines, which test the aliasing properties of resizing, denoising, and super-resolution algorithms. It seems Allen Gersho is the source, according to the Acknowledgement section of Embedded image coding using zerotrees of wavelet coefficients If you want more specific information you could ask him or one ...

7

The thing to understand here is exactly what all your transforms and data fiddling do. We'll consider a 1D discrete-time signal which is rather easier to explain and think about. The arguments extend easily to higher dimensions. By taking the DFT of that signal, which has been windowed to a finite number of samples, N, to create a frame, one implicitly ...

7

Sounds like you want to denoise and preserve edges. Have you considered nonlocal means? There's some GPL'd C++ code along with a brief writeup of the algorithm by the original authors here: http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/ One caveat, nonlocal means is very slow and the output can be sensitive to the implementation you have. You ...

7

Second question is easy: optical flow, more specifically dense optical flow, is an algorithm that takes two consecutive video frames and returns a vector field. For every pixel in frame 1 you get a vector showing where it moved to in frame 2. You can also have sparse optical flow, which only computes the motion vectors for certain pixels, such as the ...

7

The term "DC" comes from the field of signal processing back when signals were actually small currents on a copper wire... An electrical signal was usually transmited as a small modulation ("AC") over a strong and fixed current/volatage ("DC"). The strong fixed current usually determined the electrical properties of the analog components of the circuit ...

7

So one good step to enhance the vein-like structures is coherence enhancing diffusion: Weickert, Joachim. "Coherence-enhancing diffusion filtering." International Journal of Computer Vision 31.2-3 (1999): 111-127. So I first apply this algorithm to your image, aggressively. The next step is to identify the curvilinear structures, which would in this case ...

6

You might look at trying Autocorrelation for this. Here is an SO answer describing how to perform autocorrelation with Matlab using FFTs. This could be extended for two dimensions. I implemented your test case in numpy as follows: a = np.zeros(300) a[::30] = 1 plt.acorr(a, maxlags=50) This gives the following plot: As you can see, the peaks pop up at +/- ...

6

You don't need to split image into blocks. The DCT equation can be applied to the whole image. The block division has been chosen for JPEG standard partly because DCT was costly to compute in the past (but that's not the only reason). You can choose any size of block (including the single block, which is the image itself), then split image into the blocks ...

6

An answer to another question here provides a great explanation (with pictures) of what a single frequency looks like in the spatial domain. Note that a single sample in the frequency domain affects all pixels in the spatial domain. That frequency produces a sinusoid with one frequency in the x dimension and another in the y dimension. If you want to ...

6

I am not a specialist in image processing but I highly doubt this is feasible with your requirements (single image, no prior information). The challenges is twofold: Detect which area of the image is a reflection. This looks like a quite complex scene understanding problem. In your example, I know that the right side is a reflection because I can infer from ...

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

Salt-and-pepper noise is a form of noise sometimes seen on images. It presents itself as sparsely occurring white and black pixels. In another words ( in the sense of pixels), salt and pepper noise means that are high frequencies, so for salt noise the values of this noise type is high (255 ... 200), and for the pepper noise the values of this noise type is ...

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