I want to extract the peek value from a plot automatically.
I searched web plot digitizer and other programs and packages, however none of them gives points on the plot automatically. Is there any way to achieve this by using image processing such as CNN ?
I am thinking to make custom filters to find peek point.
Thanks in advance.
Sample plot
Algorithm
convert to gray-scale and binarize
find coorditates of a white pixel (x,y) where y is minimal nonzero values
add to y the blob radius y=y+r
make the scale transformation from range [0,image_height] to your range [0,25]
calculate new value of y under the transformation
Related
My friends
I got assignment to rotate image without using any library function
So now i want to Know that which algorithm I should learn
and how i start work on it
i read image using opencv but the rotation should be without library function
if some know
Help me
This sounds a lot like homework... but the concept you should learn is that for every target pixel(x,y) you need to find a source pixel in the image(u,v). You need a linear transform from(x,y) to (u,v). For translation you need to expand (x,y) to (x,y,1) and use a 3x2 matrix. Loop through all x,y pixels, find u,v by multiplying x,y,1 with a matrix, fetch the image pixel at u,v and draw it at x,y.
I am learning JavaCV and want to extract part of images dynamically based on color.
As identification I am outlining the region which I need to extract with a color. Is there anyway I can do extract ROI based on color outline. Any help appreciated.
Here is the Sample Image
it is quite simple. Since your figure has 4 corners hence you ought to follow the following steps.
1.identify the orientation of the image and store the points in a MatofPoint2f in a specific order.
(clock wise or anti clockwise- For this you can use Math.atan2(p1(y)-centerpoint(y),p1(x)-centerpoint(x)) and then sort the points according to the result of the equation. find the center point by finding the avg all the xcoords and y coords or any method you prefer).
2.Create a MatofPoint2f containing the corner coords of the result image size you want the cropped image in.
3.use Imgproc.getPerspectiveTransform() to perform the cropping.
4.Finally use Imgproc.warpPerspective() to obtain the output that is desired.
And for creating the border of the ROI the best way to go is to threshold the image by using some specific range so as to extract only those parts of the spectrum which is required.
I am not able to under stand the formula ,
What is W (window) and intensity in the formula mean,
I found this formula in opencv doc
http://docs.opencv.org/trunk/doc/py_tutorials/py_feature2d/py_features_harris/py_features_harris.html
For a grayscale image, intensity levels (0-255) tells you how bright is the pixel..hope that you already know about it.
So, now the explanation of your formula is below:
Aim: We want to find those points which have maximum variation in terms of intensity level in all direction i.e. the points which are very unique in a given image.
I(x,y): This is the intensity value of the current pixel which you are processing at the moment.
I(x+u,y+v): This is the intensity of another pixel which lies at a distance of (u,v) from the current pixel (mentioned above) which is located at (x,y) with intensity I(x,y).
I(x+u,y+v) - I(x,y): This equation gives you the difference between the intensity levels of two pixels.
W(u,v): You don't compare the current pixel with any other pixel located at any random position. You prefer to compare the current pixel with its neighbors so you chose some value for "u" and "v" as you do in case of applying Gaussian mask/mean filter etc. So, basically w(u,v) represents the window in which you would like to compare the intensity of current pixel with its neighbors.
This link explains all your doubts.
For visualizing the algorithm, consider the window function as a BoxFilter, Ix as a Sobel derivative along x-axis and Iy as a Sobel derivative along y-axis.
http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/sobel_derivatives/sobel_derivatives.html will be useful to understand the final equations in the above pdf.
AFter calculating FFT for 2-D matrix. I want to plot the spectrum.
I used the command imshow for displaying image.
But i also want to display the frequncy values on X and Y axis.
I'm unable to use linspace command.
Can someone help in plotting the frequency values on Axis.
%imshow(FF,[]) is my command for 256*256 image.
Now I want to keep the tick labels on putput image. say 1,50,100,150,200 on both axis.
please write the code for it.that could be really helpful
It is a bit unclear what you want to achieve, but here is a code snippet for plotting the Fourier transform of an image.
% Compute Fourier transform
f = imread(X); % Reading some image X
F = fft2(double(f)); % Taking Fourier transform to the input image
% Show transform image using imshow (by scaling to range 0-255)
imshow(F./max(max(F))*255);
Could someone suggest me how to go about getting the wind filter effect in opencv similar to the one available in photoshop and gimp?
Here is an image of text with wind styled filter applied on it.
Thanks
I suggest the following steps:
Use the original text image as a mask. White pixels are '1', blacks are '0'.
Smooth the image in X direction (like in the example image you added)
You can do the smoothing by
horizontal vector filter
or use distance transform where
distance is calculated only along x
axis.
I think that distance transform will
run faster
Multiply the result by (1-mask) so smoothing will occur only outside the text.
Multiply each row of the result by random number in range [0.1 ..1]. This will make smoothing uneven.
Add to the result the original image of the text to get the final image