[GRASS-dev] i.superpixels.slic ( was: #3142 Implementing SLIC image segmentation)

Rashad Kanavath mohammedrashadkm at gmail.com
Mon Dec 19 00:38:03 PST 2016


On Sun, Dec 18, 2016 at 2:53 PM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> On 18/12/16 14:01, Rashad Kanavath wrote:
>
>> Hello,
>>
>> As promised, I had pushed code to G7 addons repo
>>
>> https://trac.osgeo.org/grass/browser/grass-addons/grass7/ima
>> gery/i.superpixels.slic
>> <https://trac.osgeo.org/grass/browser/grass-addons/grass7/im
>> agery/i.superpixels.slic>
>>
>
> Great job, thanks a lot !
>
>
>> I had tested with some small datasets and is working.
>>
>> More testing welcome :)
>>
>
> I get the following warning during installation:
>
> main.c: In function ‘main’:
> main.c:514:13: warning: implicit declaration of function ‘min’
> [-Wimplicit-function-declaration]
>      seedx = min(g_width-1,seedx);
>              ^~~
>
> I think you have to explicitely define min() through a macro, or AFAIK you
> can use fmin() as elsewhere in the code.
>

I will push a fix for that.

>
> Also:
>
> - The output as it is now is not very useful. What we would need is a map
> with each pixel containing the label of the superpixel it belongs to. In
> the original code, there are both outputs: i) an image of the superpixel
> limits overlayed over the original image, ii) the labeled pixels
>

you need contour segments as seperate output and also the current one.
right?

>
> - Linked to the above: currently the superpixel boundaries are two pixels
> wide. A one-pixel boundary would be enough.
>

you can adjust no of superpixels with k. default now is 200

>
> - I don't know the details of the algorithm well enough, but would it be
> possible to extend it beyond the use of r,g,b maps as input. Ideally, the
> use should be able to provide a group as input and all maps in the group
> are used in the definition of the superpixels. This should also include the
> case when you only have one band (e.g. black and white orthophoto).
>

I need help in understanding this part. because in code, it operates on lab
color space. first it takes RBG and convert to LAB. This is reason, I had
to put red,green,blue parameters.



>
> Again, many thanks for taking this first step, allowing us to test !
>
> Moritz
>



-- 
Regards,
   Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20161219/2f3bb45b/attachment.html>


More information about the grass-dev mailing list