Mapping and GIS Solutions Community

 View Only
Expand all | Collapse all

How to use a thematic layer to restrict a segmentation and classification in eCognition?

  • 1.  How to use a thematic layer to restrict a segmentation and classification in eCognition?

    Posted 07-30-2020 06:10
      |   view attached

    Hello,

     

    I need to perform a segmentation and classification in eCognition but only within the areas (polygons) covered by my thematic layer.

     

    I have successfully performed a chessboard segmentation using my thematic layer and a very large object size to derive image objects from the polygons in my thematic layer. However, I cannot figure out how to perform further segmentations without reverting to segmenting the entire scene. I have tried assigning my image objects to a class and then using a class filter to restrict the next segmentation algorithm to that class only, but it still segments the whole scene.

     

    My desired processing steps are:

     

    1. Perform an initial chessboard segmentation using my thematic layer to derive image objects from the polygons in my thematic layer (I have achieved this).

    2. Perform another chessboard segmentation so that every pixel becomes an image object - but only within the areas covered by my thematic layer (I have not been able to achieve this as it segments the whole scene).

    3. Perform multi-resolution segmentation in a bottom-up approach - but only within the areas covered by my thematic layer (I have not been able to achieve this due to difficulty with step 2).

     

    I have attached a crude sketch of the three processing steps above in the hope that it clarifies what I am trying to achieve.

     

    I am very grateful for any advice you might have.

     

    Thank you very much.

     

    Sarah



  • 2.  Re: How to use a thematic layer to restrict a segmentation and classification in eCognition?

    Posted 08-03-2020 07:40

    After battling with this issue for several days I have finally resolved it. I will outline the steps I took in case anyone else has this question in the future:

     

    1. Perform a chessboard segmentation using your thematic layer. Perform it at the pixel level and set the object size to a number greater than the number of pixels in your image. (Take care not to put a comma in the object size number or it won't work, e.g. 1000000 not 1,000,000). The polygons in your thematic layer are now represented by image objects.

     

    2. Append a new process. Select the Assign Class algorithm. In the Edit Process window change the Value field next to the Use Class parameter from 'Unclassified' to a new name (whatever you wish to name your class). The Domain should read 'image object level'. Select the Value field next to the Condition parameter. The Edit Condition window opens. In the Value 1 field select 'From Feature'. Expand 'Object features' and 'Thematic attributes'. Select 'Create new Number of overlapping thematic objects'. Back in the Edit Condition window in the Operator field choose the greater than sign '>'. The Value 2 field should read '0' (zero). Select Execute. You have now assigned the image objects to a class.

     

    (Note: when you edit the name of the Use Class field the Class Description window will open. You can use this window to assign classes using a threshold, however for my purpose I needed to assign the class using a condition so I closed this window.)

     

    3. Perform an additional segmentation (e.g. multi-resolution) at the image object level. Select the Value field next to the Class Filter parameter and check the box next to the class you created in step 2. Thematic layer usage can be set to 'No'. The segmentation will now perform only on the image objects from the class selected in the Class Filter, i.e. the segmentation will perform only on areas covered by your thematic layer.

     

    I hope this helps.

     

    Sarah



  • 3.  RE: Re: How to use a thematic layer to restrict a segmentation and classification in eCognition?

    Posted 07-12-2021 14:36
    It helped greatly! Thanks for saving me a ton of time!

    -Kevin

    ------------------------------
    Kevin Colgan
    ------------------------------



  • 4.  RE: Re: How to use a thematic layer to restrict a segmentation and classification in eCognition?

    Posted 04-09-2023 16:24

    I am trying to do that same thing, and it works with a small thematic layer polygon. But when I want to use a thematic layer polygon almost as big as the image (just to leave out some parts in which I am not interested), the thematic layer does not appear over the image and when I ask it to do a vector segmentation it just creates a single object over all the image (not over the polygon of interest). Do you know what may be going on?



    ------------------------------
    Esteban Rodofili
    ------------------------------