Automatic cropping of an ultrasound scanner image.
When streaming or storing images/video on ultrasound scanner, the menu and a lot of information around the actual ultrasound image is included. This algorithm tries to extract the ultrasound image from the entire scanner GUI image using two thresholds. It does this by counting the number of non-zero pixels in every row and column of the image. Works best on linear array images.
- 0: Image
- 0: Image
- class ProcessObject
- Abstract base class for all process objects.
- void execute() virtual
UltrasoundImageCropper:: create(float physicalWidth,
|physicalWidth||The physical width of the scanning region. This is used to set the pixel spacing correctly.|
|staticCropping||Estimate the cropping parameters (offset, size) on the first frame only, then use these for all subsequent frames|
|Returns||By setting the physical width of the image, the physical height can also be calculated and the spacing of the image set correctly.|
UltrasoundImageCropper:: setStaticCropping(bool staticCropping)
If static cropping is enabled, the cropping parameters are calculated only for the first frame. Otherwise, it is recalculated for every frame.