- Use the "bwconvhull" function. This function calculates the smallest convex polygon that encompasses all the objects present in the binary image.
- Utilize the "regionprops" function to extract the centroid and orientation of the convex hull.
- Fit a line through the centroid which has a slope equal to the tangent of the orientation obtained from the "regionprops" function.
- Using the slope and centroid coordinates, generate a set of ‘x’ values and calculate the corresponding ‘y’ values for the line equation.
- Further, ‘rasterization’ is performed to determine the pixels covered by the line. To perform ‘rasterization’, the code segment utilizes Bresenham's line algorithm. This algorithm calculates the coordinates of the pixels that the line passes through. The starting and ending points of the line are provided as input.
- The resulting pixel coordinates are then used to update the corresponding pixels in the binary image matrix. The value of these pixels is set to 1, indicating that they are part of the line.
- Display the updated binary image using the "imshow" functiion.
How to determine the midline in brain images.
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Same as the title, I want to determine this
0 comentarios
Respuestas (2)
Shreeya
el 6 de Sept. de 2024
Editada: Shreeya
el 6 de Sept. de 2024
Hi
According to my understanding, you want to determine the midline in a binarized brain image. You can follow the below mentioned steps to achieve this:
Refer to the following links to learn more about the "bwconvhull" and "regionprops" and Bresenham's algorithm respectively.
0 comentarios
Image Analyst
el 6 de Sept. de 2024
Hard for us to say, don't you think, without seeing an image? What is the midline? Is it just the geometric midline as determined by the skull? Or do you want to find it based on the brain hemispheres internal to the skull boundary? Or are they always guaranteed to be the same?
I suggest you look in the Image Processing literature for published papers on it. http://www.visionbib.com/bibliography/contentsmedical.html#Medical%20Applications,%20CAT,%20MRI,%20Ultrasound,%20Heart%20Models,%20Brain%20Models
If you have any more questions, then attach your image with the image or paperclip icon after you read this:
0 comentarios
Ver también
Categorías
Más información sobre MRI en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!