mainRAPP - Raster Processing Primitives - Support: sr #109539, Usage of Dilate And Erode...

 
 

sr #109539: Usage of Dilate And Erode Morphological

Submitter:  douglas medeiros <douglasjfm>
Submitted:  Tue 07 Aug 2018 01:01:16 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Aug 2018 10:16:49 PM UTC, comment #1: 

Johan Almbladh pointed out the issue with missing padding, in http://lists.nongnu.org/archive/html/rapp-users/2018-08/msg00001.html.

By the way, for a really trivial example, see the testsuite, for example http://git.savannah.nongnu.org/cgit/rapp.git/tree/test/installtest/closing.c.

With the padding issue fixed, are there more concerns?

Hans-Peter Nilsson <hpataxis>
Group administrator
Tue 07 Aug 2018 01:01:16 PM UTC, original submission:  

Hi,
I trying to perform morphological operation using RAPP, but unsuccessfully. This is the code (in short):

    lg -> image width, al -> image height;
    src_morpho_dim = rapp_align((lg+32) / 8);
   
    memcpy(src_morpho, bin, lg*al / 8);//bin is an image binarized by rapp threashold func.

    memset(buffer_work, 0, buffer_tam);//simply using

    ret = rapp_morph_dilate_rect_bin(src_morpho2, src_morpho_dim, src_morpho, src_morpho_dim, lg, al, 21, 21, buffer_work); src_morpho2 and src_morpho have same dim and are allocated by rapp_malloc.

    if (ret)
    {
        printf("DILATE %s\n", rapp_error(ret));
    }
   
    buffer_work is allocated by: rapp_align(rapp_morph_worksize_bin(lg, al));
    memset(buffer_work, 0, buffer_tam);

    ret = rapp_morph_erode_rect_bin(dst_morpho, dst_morpho_dim, src_morpho2, src_morpho_dim, lg, al, 21, 21, buffer_work);

    if (ret)
    {
        printf("ERODE %s\n", rapp_error(ret));
    }

    ret = rapp_type_bin_to_u8(out_bin, rapp_align(lg), src_morpho2, src_morpho_dim, lg, al);

The above code runs, but the resultig image, a binarized image, u8 typed, referenced by out_bin, is totally confuse. I supose I'm not using the correct alignment but I'm not sure of this.

Thanks in advance fo any help...

douglas medeiros <douglasjfm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hpataxis (Posted a comment)
  • -email is unavailable- added by douglasjfm (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-15 hpataxis StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code