Transforming axis. How to create a customized axis.

I have x,y,z coordinates from a tissue and corresponding them, a signal value. The tissue is curved, so when I plot data in x-y plane, I can see the graph as shown. I want to plot 2D graph such that my x-axis is the midline of tissue(black line) and y-axis is my signal value.
Thanks!Sample_3_z1-11.jpg

8 commentaires

Jan
Jan le 22 Jan 2019
How is the black line defined? In which format are the 3D data availble?
The black line is parallel to the boundaries of the tissue and is equidistant from the boundary lines.
I don't know exactly how to mathematically express the boundary of the tissue.
The data is in csv format. x,y,z corrdinates are the centroids of each cell. Green marker marks the cell boundary
InkedSample_2_LI.jpg
Is there a way in MATLAB such that I can import the image then specify some points along the line in the image and it can transform those points into x-axis?
Jan
Jan le 23 Jan 2019
I still do not know, what you want to achieve. What should happen with the rest of the image, if the black line is the X-axis?
Chandel Singh
Chandel Singh le 31 Jan 2019
Modifié(e) : Chandel Singh le 31 Jan 2019
I want to transform x-axis in a way that the black line is my x-axis. The y-axis will be the perpendicular line to this new x-axis.
The problem boils down to this : How can I transform x-axis to an axis which is drawn manually ,by hand, in an image?
Two parts to the problem:
1) How can I get coordiantes of a line, I draw in an image ?
2) then, use those coordinates to transform the x-axis ?
Please mention if further clarification is required.
I get that I haven't explained the problem properly. But I'll try my best
Jan
Jan le 31 Jan 2019
"Axis" means a straight line. Therefore we still have to guess, which line you mean.
To 1) It depends on how you draw in the image. But after drawing, the coordinates should be available directly.
To 2) It depends. If you mean a manually drawn line, this will not be straight necessarily. Then there is no unique transformation to a line. You could e.g. draw a circle, or a curve, which is intersecting itself. This should show immediately, that a unique definition of such a transformation is not possible. So please explain, what you want to achieve.
Chandel Singh
Chandel Singh le 10 Fév 2019
Modifié(e) : Chandel Singh le 10 Fév 2019
i apologize for the way i had described problem earlier. Hopefully the current way might make it clear
defining problem once more :
the data has x,y coordinate and a cooresponding value signal value to it(shown in figure in black is the contours of the data in xy plane). The objective is to plot the data along a handrawn curve.
These are the goals:
1) to draw a curve on image by hand
2) extract it’s corrdinates
3) then fit a curve of the form y =f(x), where f(x) can be a polynomial or any function which approximates the handrawn curve using the extracted coordinates.
  • 2nd point is not required if we can directly fit a curve.
4) plot the data along this new curve( as illustrated in figure )
map all the points such that y coordinte is the perpendicular distance of the pojnt from the curve and x coordinate is the aling thr curve from an end of the curve.
Jan
Jan le 11 Fév 2019
@Chandel Singh: So start with finding a function to fit the hand drawn curve. This is not trivial and there is no unique solution. What about a cubic spline or are there any mathematical restrictions to the wanted function?
Afterwards a problem remains: in the parts, where the function is konvex, the relation is not necessarily unqiue. Example: If the fitted line is a circle, you cannot find a unique correlation between the curve and the center. This means, that there is no guarantee that there is a unique solution to you problem.
But you can find some solutions. Currently this problem does not concern Matlab, so you have to find mathematical solutions any where elese at first, before it matchs the topic of this forum.

Connectez-vous pour commenter.

Réponses (2)

jahanzaib ahmad
jahanzaib ahmad le 22 Jan 2019

0 votes

minus some value from x coordinates
like if u have x,y data in A .
A =[A(:,1)-1321 A(:,2)];

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Commenté :

Jan
le 11 Fév 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by