X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 07 Oct 2014 03:04 AM by  anon
Performing Canny Filter
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
07 Oct 2014 03:04 AM
    Hello, I'm new with IDL. I 'm trying to reproduce the following code to test a canny filter on a png 8 bit unsigned integer : http://www.exelisvis.fr/docs/CANNY.html This is how I modified the code in my case : img = READ_PNG(FILE_SEARCH('SoCor_062_2.png', /FULLY_QUALIFY_PATH)) filtered = CANNY(img) TVSCL, img, 0 TVSCL, filtered, 1 First, when I display the raw image with "TVSCL, img, 0", it shows a black picture frame instead of showing my image. Then, when I display the filtered image, I have an error : "Expression must be an array in this context: FILTERED". However, the example code from EXELVIS do not show the making of an array. I followed quite closely the example... Any help to arrange and make this code working ? Bye

    Deleted User



    New Member


    Posts:
    New Member


    --
    08 Oct 2014 07:14 AM
    Check the result from each step. You might not be in the correct directory for IDL to give you the full file pathname of your png file. res = FILE_SEARCH('SoCor_062_2.png', /FULLY_QUALIFY_PATH) print, res img = read_png(res) help, img That might help get you on track. Josh

    Deleted User



    New Member


    Posts:
    New Member


    --
    09 Oct 2014 02:14 AM
    Hello, The png file has been detected as an array before the canny filter, but the filtered image has become an integer. The visualization of the raw image is still black, and the visualization of the filtered one is still impossible because of the int type. However, I still don't get the difference with the script example...

    Deleted User



    New Member


    Posts:7
    New Member


    --
    11 Nov 2014 06:02 AM
    Hi Samy, Does your image contain a single band or multiple bands? CANNY is prepared to work with a 2D matrix. If you try to run it with an RGB image (that contains 3D data, 3xMxN) it will fail. And TV needs the TRUE=1 parameter to display RGB images. Imanol
    You are not authorized to post a reply.