Code Record

2018-10-01

[DOI: 10.21982/9k29-dm62 _target: ] Automatic Morphological Attribute Profiles
Cavallaro, Gabriele
-------------------------Manual thresholds---------------------------- PROFILE = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, L) PROFILE = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, L, F) PROFILE = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, L, F, P) -------------------------Automatic thresholds------------------------- [PROFILE SL] = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, M ,S) [PROFILE SL] = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, M ,S, F) [PROFILE SL] = MORPHOLOGICAL_ATTRIBUTE_PROFILE(I, T, A, MET, M ,S, F, P) INPUT ***************************Mandatory parameters************************** I: 2D input image. Data type supported: uint8, uint16. T: Tree representation. String. Trees supported: Min-tree: 'min-tree'; Max-tree: 'max_tree'; Tree of shapes: 'ToS'; A: Attribute type. String. Attribute supported: Area: 'a', 'area'; Length of the diagonal of the bounding box: 'd', 'diagonal'; Moment of inertia: 'i', 'inertia'; Standard deviation: 's', 'std'. MET: Method for selecting the thresholds. String. Either 'manual' or 'automatic' -------------------------MET='manual'---------------------------- L: Values of lambda. Array of double. -------------------------MET='automatic'------------------------- M: Measure. String. Measure supported: Sum of the gray levels: 'grayvalues'; Sum of the number of pixels: 'pixels'; Sum of the number of regions: 'regions'; S: Strategy. Either String ('error') or Scalar (>0) . N: Answer of the decison. Scalar. ***************************Optional parameters************************** F: Filtering rule. String. Rules supported: Min: 'min'; Max: 'max'; Direct: 'direct'(default for attributes 'a', 'd'). Sub: 'sub' (default for attributes 'i', 's'). P: Print on screen. String. Either 'off' (default) or 'on'. OUTPUT PROFILE: Array of 2D images of the same data type of the input image. If 'min-tree' then PROFILE = Thickening profile ; If 'max_tree' then PROFILE = Thinning profile ; If 'ToS' then PROFILE = Self-dual profile ; SL: Selected values of lambda. Array of double.

Code Site: https://b2drop.eudat.eu/s/dNGBGy2LQTDAjaN

Appears in: G. Cavallaro, N. Falco, M. Dalla Mura and J. A. Benediktsson, "Automatic Attribute Profiles," in IEEE Transactions on Image Processing, vol. 26, no. 4, pp. 1859-1872, April 2017.
doi: 10.1109/TIP.2017.2664667

Code Languages: C++, Other - MATLAB

To compile code: - All operating systems that are supported by MATLAB - GCC - Instructions: 1. Open a terminal (or a Command Prompt) 2. Navigate to /your_path/ Morphological_Attribute_Profiles/object-files/OpenME/src 3. Make sure you have a compiler (e.g., gcc --version) 4. Compile the sources with: gcc main.c fimage.c mw.c list.c shape.c list.c flst.c tree.c flst_reconstruct.c -c -fPIC 5. You will get these object files: main.o fimage.o mw.o list.o shape.o list.o flst.o tree.o flst_reconstruct.o 6. Copy these object files into /your_path/Morphological_Attribute_Profiles/object-files/ 7. Open MATLAB 8. Go to the main folder /your_path/Morphological_Attribute_Profiles 9. Run >> mex morphological_attribute_profile.cpp object-files/mw.o object-files/list.o object-files/fimage.o object-files/shape.o object-files/flst.o -Iheader -Iheader/ -DNDEBUG 10. Check if the binary MEX file work. Run >> morphological_attribute_profile

Sensor Categories: SAR, Optical Imager

Instrument Processing and Calibration Categories: SAR, Optical Imager

Keywords: Automatic attribute profiles, filter parameters selection, tree representation, mathematical morphology, remote sensing, image processing