ray tracing, indices and path length registration
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all
Thank you for reading my following question and I greatly appreciate any of your help.
Problem: Given a grid (N*N) and a non-straight ray with known discrete coordinates, how to register the indices and path length in the pixels crossed by the ray? This is on a plane, what if it is in 3d space? Are there any existing MATLAB script to carry out this function?
Thank you very much.
Sincerely
Albert
댓글 수: 6
Alexander Jones
2018년 6월 26일
Hello, I am trying to do some microwave tomography, and am in need of a very similar thing - I was wondering if you found a solution to the problem of finding path length, and if so if you could please point me in the right direction.
채택된 답변
Anton Semechko
2018년 6월 26일
편집: Anton Semechko
2018년 6월 26일
For 2D reconstruction, the problem can be approached follows:
1) Let's say you have a set of K rays {Rk}, where Rk is k-th ray parameterized by the equation Rk(t)=Xk+t*Dk, where Xk is the point of origin and Dk is the direction of travel.
2) Given a M-by-M grid (G) sampled on a plane passing through point P with unit normal N, find points of intersection between G and all of the rays {Rk}.
3) Find transformation that aligns N with the z-axis, and horizonal and vertical grid lines of G with the x- and y-axes, respectively.
4) Apply the transformation from (3) to the points of intersection in (2).
5) Bin data from (4) to get the intensity image corresponding to the number of hits in a given bin (i.e., grid cell/pixel).
This process can be easily generalized to get a volumetric image using a 3D grid. This is because 3D grid is just a stack of 2D grids.
댓글 수: 2
Anton Semechko
2018년 6월 27일
Yeah, I missed the part where you said that the rays aren't straight. In that case, rays can be (i) approximated as piecewise linear curves composed of several straight line segments, (ii) points intersection can be approximated by finding line segments that intersect with the plane containing the grid, (iii) if the rays have analytical representation, points of intersection can be refined using a root-finding algorithm.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!