Select for regions of interest in image analysis
30 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
2 contribuyentes han marcado con alerta este/a pregunta
1 comentario
Respuestas (2)
Shreshth
el 29 de Nov. de 2023
Hello LaraS,
I understand that you want to write code that segments focal adhesion structures on cells by tracing intensities to isolate the most intense areas.
Here are a few possible areas of improvement that I could observe in the code that you have provided.
- Manual ROI Selection: Your initial approach relies on manual input to determine the number of ROIs, which can introduce user bias and inconsistency, especially when processing a large number of frames.
- Variable Scope and Initialization:You're initializing variables like ‘Fret_ins‘ and traces inside the loop, which would reset their values on each iteration. This would result in losing previously stored data.
- Loop Indexing: The same loop index ‘i’ is used for both the outer and inner loops, which will lead to incorrect indexing and overwriting of variables.
As a potential alternative, using Otsu’s method for thresholding can deliver you the desired result.
Otsu's method is an automatic thresholding technique that works well when the image has a bimodal intensity histogram (i.e., two distinct peaks or classes). It calculates the threshold that minimizes the weighted within-class variance or, equivalently, maximizes the between-class variance. The method assumes that the image contains two classes of pixels (foreground and background) and then finds the threshold that separates these two classes so that their combined spread (intra-class variance) is minimal.
Advantages of Otsu's Method
Automatic: It does not require manual intervention or parameter tuning for each image, which makes it suitable for batch processing of images.
Objective: The threshold is determined by the algorithm based on image statistics, which eliminates user bias.
Efficient: Otsu's method is computationally efficient and can be easily implemented with built-in MATLAB functions.
For more information about Otsu's method and how to use it in MATLAB, you can refer to the documentation by MathWorks for ‘graythresh’ which is MATLAB's implementation of Otsu's method:
Thank you,
Shubham Shreshth.
1 comentario
Image Analyst
el 29 de Nov. de 2023
Good catch on using i for both loops.
Fret_ins is not even used so that line could be removed.
Image Analyst
el 29 de Nov. de 2023
See my attached demo to get the mean of each frame. It could easily be adapted to give the mean of each blob if there are several blobs in each frame that are segmented out.
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!