![]() |
ImFusion SDK 4.3
|
#include <ImFusion/US/GeometryDetection.h>
Actual implementation for automatically detecting the ultrasound image geometry from screen recordings. More...
Inheritance diagram for GeometryDetection:Actual implementation for automatically detecting the ultrasound image geometry from screen recordings.
This algorithm applies a series of image analysis operations to automatically determine the region and shape of the actual ultrasound image content. After successful computation it will provide an instance of FrameGeometry describing the shape of the US image.
When given a set of images as input this class will identify US pixels as pixels that change between frames. When given a single image, this class will use thresholding to identify US pixels
Public Types | |
| enum class | GeometryType { Detect , Linear , Convex , Sector } |
Public Member Functions | |
| std::unique_ptr< US::FrameGeometry > | compute (const std::vector< const TypedImage< unsigned char > * > &frames) |
| Compute the US geometry from the given frames. | |
| std::unique_ptr< US::FrameGeometry > | compute (const TypedImage< unsigned char > *frame, unsigned char threshold=35, vec2i bbTL={0, 0}, vec2i bbBR={0, 0}) |
| Compute the US geometry from a single frame using thresholding. | |
| std::pair< vec2i, vec2i > | boundingBox () const |
| Call after compute() to get the axis-aligned bounding box containing the entire US image. | |
| std::shared_ptr< TypedImage< unsigned char > > | debugImage () |
| Return the detection debug image if enabled. | |
Public Member Functions inherited from Configurable | |
| virtual void | configure (const Properties *p) |
| Configure this object instance by de-serializing the given Properties. | |
| virtual void | configuration (Properties *p) const |
| Serialize the current object configuration into the given Properties object. | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Public Attributes | |
| Parameter< bool > | p_enableGrayscaleFilter = {"enableGrayscaleFilter", false, this} |
| Skip non-grayscale pixels in an RGB image. | |
| Parameter< bool > | p_enableDebugImage = {"enableDebugImage", false, this} |
| Enable debug image. | |
| Parameter< GeometryType > | p_geometryType = {"geometryType", GeometryType::Detect, this} |
| Limit the detection to a certain type of geometry. | |
| Parameter< int > | p_closeRadius = {"closeRadius", 2, this} |
| Radius for the close operation that is used to clean-up the detection. | |
| Parameter< int > | p_intensityThreshold = {"intensityThreshold", 35, this} |
| Threshold used to detect the geometry when only one frame is available. | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Additional Inherited Members | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
| std::unique_ptr< US::FrameGeometry > compute | ( | const std::vector< const TypedImage< unsigned char > * > & | frames | ) |
Compute the US geometry from the given frames.
Will return a valid FrameGeometry on success.
| frames | Set of at least 2 frames containing US images. The frames are expected to be compatible to each other. They can be of any number of channels. |
| std::unique_ptr< US::FrameGeometry > compute | ( | const TypedImage< unsigned char > * | frame, |
| unsigned char | threshold = 35, | ||
| vec2i | bbTL = {0, 0}, | ||
| vec2i | bbBR = {0, 0} ) |
Compute the US geometry from a single frame using thresholding.
Will return a valid FrameGeometry on success.
| frame | The frame is expected to be top-down, i.e. the US scan lines are travelling in the direction of increasing Y values. |
| threshold | The threshold value |
| std::pair< vec2i, vec2i > boundingBox | ( | ) | const |