In Matlab, how to convert a polygon in matrix data to a vector of complex number? - matlab-figure

I'm trying to convert a polygon in a bitmap image (matrix) to a vector of complex numbers.I trying to make a small code to do that job but it doesn't work. I wonder if someone has met this problem, could you please help me out here? Thanks in advance!
Nhat,

Related

Vector order statistics - color image edge detection

I'm trying to implement specific algorithm from vector order statistics, does anyone implemented that before? Im using matlab, but any source of example would be very helpful.
Im trying MVR - minimal vector range, but im stuck in understanding the alghorith and how to make a code from this paper.
Original paper: https://tspace.library.utoronto.ca/bitstream/1807/10051/1/Venetsanopoulos_11349_535.pdf

3D triangulation using HALCON

My aim is to calibrate a pair of cameras and use them for simple measurement purposes. For this purpose, I have already calibrated them using HALCON and have all the necessary intrinsic and extrinsic camera Parameters. The next step for me is to basically measure known lengths to verify my calibration accuracies. So far I have been using the method intersect_lines_of_sight to achieve this. This has given me unfavourable results as the lengths are off by a couple of centimeters. Is there any other method which basically triangulates and gives me the 3D coordinates of a Point in HALCON? Or is there any leads as to how this can be done? Any help will be greatly appreciated.
Kindly let me know in case this post Needs to be updated with code samples
In HALCON there is also the operator reconstruct_points_stereo with which you can reconstruct 3D points given the row and column coordinates of a corresponding pixel. For this you will need to generate a StereoModel from your calibration data that is then used in the operator reconstruct_points_stereo.
In you HALCON installation there is an standard HDevelop example that shows the use of this operator. The example is called reconstruct_points_stereo.hdev and can be found in the example browser of HDevelop.

Is image stitching with a fundamental matrix, instead of a homography, possible?

I would like to ask a question I already asked on the OpenCV board but did not get an answer to: http://answers.opencv.org/question/189206/questions-about-the-fundamental-matrix-and-homographies/.
After learning about the fundamental matrix I have the following question that I could not answer by googling. The fundamental matrix is a more general case of the homography as it is independent of scene's structure. So I was wondering if it could be used for image stitching instead of a homography. But all papers I found only use homographies. So I reread the material about the properties of the fundamental matrix and now I am wondering:
Is it not possible to use the fundamental matrix for stitching because of its rank deficiency and the fact that it does only relate points in Image 1 to lines (epipolar lines) in Image 2?
Another question I have regarding homographies: All papers I read about image stitching use homographies for rotational panoramas. What if I want to create a panorama based only on translation between images? Can I use the homography as well? The answers provided by a google search vary quite a lot.
Kind regards and thanks for your help!
Conundraah
About using fundamental matrix for stitching.
It actually depends on how you want to stitch the image together.
The problem is even if you get the fundamental matrix, when you stitch images together, you will only need homography matrix to do the transformation of images. So what is the point of using fundamental matrix. Unless you figure out how to handle the different distance on the same image.
In the case of panorama images, the assumption is that the scene structure is far enough to be seen as planar, so comparatively the translation could be ignored. If that is not the case, translation could be considered.

how to find spatial frequencies of line in a image in matlab

I'm interested to find the spatial frequencies corresponding to this line from the entire image as shown in this link http://tinypic.com/view.php?pic=a0fi9i&s=5
[EDIT: uploaded pic]
can anyone suggest ideas how to find these spatial frequencies?
Thanks in advance.
The naive answer here is to simply use a 2D FFT. If this doesn't do what you were hoping for, you will need to clarify your question.

Liquify filter/iwarp

I'm trying to build something like the Liquify filter in Photoshop. I've been reading through image distortion code but I'm struggling with finding out what will create similar effects. The closest reference I could find was the iWarp filter in Gimp but the code for that isn't commented at all.
I've also looked at places like ImageMagick but they don't have anything in this area
Any pointers or a description of algorithms would be greatly appreciated.
Excuse me if I make this sound a little simplistic, I'm not sure how much you know about gfx programming or even what techniques you're using (I'd do it with HLSL myself).
The way I would approach this problem is to generate a texture which contains offsets of x/y coordinates in the r/g channels. Then the output colour of a pixel would be:
Texture inputImage
Texture distortionMap
colour(x,y) = inputImage(x + distortionMap(x, y).R, y + distortionMap(x, y).G)
(To tell the truth this isn't quite right, using the colours as offsets directly means you can only represent positive vectors, it's simple enough to subtract 0.5 so that you can represent negative vectors)
Now the only problem that remains is how to generate this distortion map, which is a different question altogether (any image would generate a distortion of some kind, obviously, working on a proper liquify effect is quite complex and I'll leave it to someone more qualified).
I think liquefy works by altering a grid.
Imagine each pixel is defined by its location on the grid.
Now when the user clicks on a location and move the mouse he's changing the grid location.
The new grid is again projected into the 2D view able space of the user.
Check this tutorial about a way to implement the liquify filter with Javascript. Basically, in the tutorial, the effect is done transforming the pixel Cartesian coordinates (x, y) to Polar coordinates (r, α) and then applying Math.sqrt on r.

Resources