The earlier submission (which can be found in the following link) has provided an active shape function which tries to fit to the Canny edges of the object.
This submission includes a new active shape function which tries to fit a virtual shape on the objects based on the intensity change.
The best results can be obtained when the seed points (starting positions of the virtual boxes) are chosen inside of the square or rectangular buildings of digital elevation models.
In order to see an example, open the DEMO.m file and press F5.
The last step of the DEMO.m code also includes a short script to generate an approximate 3D view using the detected shape as footprint, mean of interior intensity values as height and using the given input image for texturing the 3D model.
Beril Sirmacek (2024). Intensity Value Based Box Fit (2D Active Shape Growing) (https://www.mathworks.com/matlabcentral/fileexchange/54017-intensity-value-based-box-fit-2d-active-shape-growing), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!