Closed quancore closed 9 months ago
The UltrasoundImageCropper is far from perfect. Especially for sector scans. It can be hard to find a threshold that works perfectly for all cases. Still, looking at your input image, in this particular case, it should work with the right threshold values.
One of the problems is that there is no proper explanation about those threshold values and how to setup for different cases, maybe you can elaborate a bit?
For each column and each row it counts how many pixels have a value above 0. To find the min x and max x positions, it starts from the middle and stops at the first x position which has a number of pixels equal to 0 above the thresholdHorizontal. It does this both in the left and right direction. Then this is repeated for the vertical direction, y using thresholdVertical.
I have added more documentation on this method. Thanks. Closing.
I am trying to crop GUI elements from single ultrasound images but it does not work (tried different thresholds), what should I do for this case?