Changes between Version 3 and Version 4 of GSoC/2016/Additional_segmentation_algorithms/weekly_report


Ignore:
Timestamp:
May 29, 2016, 10:46:08 AM (8 years ago)
Author:
hao2309
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GSoC/2016/Additional_segmentation_algorithms/weekly_report

    v3 v4  
    2323* A small exercise too get more familiar with basic GRASS code
    2424
     25>>Moritz:
    2526>>As as part of bonding period, and as you are now able to compile GRASS, I would like to propose a small exercise which is already a first step in the direction of your project and which should allow you to become a bit more familiar with the code and with coding practices: As currently i.segment only provides one algorithm, the entire layout of the module GUI is related to that one algorithm. In the attached screenshot you see the current GUI. My idea would be to have the three  mandatory inputs in the Required tab, then one tab per algorithm with algorithm-specific parameters, then the Optional tab. Otherwise, I'm afraid that the current'Settings' tab becomes overcrowded.
    2627
     
    3334
    3435* Finish the exercise to adding more parameters to the i.segment
    35 
     36>Bo:
    3637>I think I've finished the exercise. For the time being I applied the following changes to the module GUI:
    3738>1.  I kept "required" tab and add the selection of algorithms. Because I think for all of the three algorithms the input data and output location are required, so this tab now is designed for the inputs and outputs for all three algorithms
     
    46474. Zhou, J.-X., Li, Z.-W., & Fan, C. (2015). Improved fast mean shift algorithm for remote sensing image segmentation. IET Image Processing, 9(5), 389–394. http://doi.org/10.1049/iet-ipr.2014.0393
    4748
     49* Discussion about the algorithm and literature
     50>>Markus:
     51>>I was reading through the literature that Moritz sent and think that the implementation of mean shift is relatively easy. The most complicated part is figuring out a method for adaptive bandwidth where the spatial and the range bandwidth might need to be adapted differently.
     52>>As far as I understand, the mean shift method consists of two parts 1. change band values to become more similar to neighboring cells by use of a spatial and a range weighing kernel 2. identify connected components (cells with similar band values), this is also known as clusters or in GRASS as clumps (r.clump). For this part, a modified version of the r.clump code can be used
     53>>All together, this seems much simpler than the current region growing method, e.g. the search trees used by region growing are not needed for mean shift.
     54>>
     55>>More technical:
     56>>If I understand correctly, mean shift requires three parameters:
     57>>spatial bandwidth, range (band value) bandwidth, and threshold to indicate when to stop adjusting band values (max difference < threshold). Apparently, result improve if the two bandwidths are adapted for each sampling window separately. As weighing function I suggest a Gauss kernel, this is already available at various places in the GRASS source code. For spatial weighing, a finite kernel is needed and the Gauss kernel is infinite. The spatial bandwidth could mean standard deviation in number of cells, the cap could be set at standard deviation times 3 or 4, making it a finite kernel. For the range weighing, an infinite Gauss kernel is fine because the range of observed values is restricted by the finite spatial kernel. See also r.resamp.filter which offers various finite and infinite kernels and an explanation of their difference. The existing methods to use either euclidean or manhattan distance can be used as is for mean shift.
     58>>Suggested code structure for mean shift is in trunk r68482.
     59>>
     60>>The identification of connected components (neighboring cells with similar band value) would also need a threshold, maybe the same threshold as for the main mean shift algorithm can be used.
     61>>Additionally, the already existing option to consider 4 or 8 neighbors can be acknowledged.
     62>>
     63>>I guess the mean shift algorithm will be faster and less memory intensive than the region growing algorithm.
     64
     65
    4866== 23 - 28 May week 1: Start coding, develop pseudo code to outline the work ==