X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Mar 2015 01:00 PM by  anon
WIDGET_BASE: Invalid widget identifier
 6 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
12 Mar 2015 01:00 PM
    I have been using ENVI/IDL to test the ENVI_NEURAL_NET_DOIT function. I copied the test program found in http://grid.kim/d/ENVI_4_...NEURAL_NET_DOIT.html compiled it, and ran it for a sample image file and its associated ROI file. When the program got to the envi_doit, 'envi_neural_net_doit' call, I get the error message: Error: "WIDGET_BASE: Invalid widget identifier: 2." The result may be invalid. Does anyone know why I got this message, and how I can fix it? I would appreciate any help I could get.

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Mar 2015 03:40 PM
    The test program you found is in some pretty old documentation, but I don't see any reason why this code would not work. I actually went ahead and tested the code with the latest version of ENVI + IDL (5.2/8.4) and it worked without error. Are you using the sample image and roi that is suggested in the the tutorial? Have you tried doing a neural network classification through the user interface? If so, did it work with the sample image and ROI file you are using in your code? I'm also curious what version of ENVI + IDL you are working with. Thanks, Joe

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Mar 2015 09:05 AM
    Hi, Joe. Thank you for your response. To test my code, I used one of the IMG files in C:\Program Files\Exelis\ENVI52\classic\data (bhdemsub.img). I created the correponding ROI file before running the code.

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Mar 2015 11:31 AM
    I would not be surprised if you received an error with that input file because that sample file is a single band Digital Elevation Model. The neural net classifier is designed for classification of multispectral imagery. Can you try running the code using the bhtmref.img file that is located in that same directory? You should be able to get the code to run with this multispectral image, which is a Landsat multispectral image. Good luck!

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Mar 2015 12:17 PM
    Thanks, Joe. That fixed the problem. I am running ENVI 5.2 and IDL 8.4. What should my output file look like? When I opened the "testimg" file (out_name), I just got a solid-colored shape outlining the ROI. I don't think that should be the testimg file.

    Deleted User



    New Member


    Posts:
    New Member


    --
    16 Mar 2015 11:02 AM
    Yeah, that doesn't sound right to me either, but it's hard for me to say without the data in front of me. One thing I can suggest is when creating your ROI file to make sure you have several ROIs with distinct spectral characteristics. Also, to work with this classic ENVI_DOIT routine, the ROIs should be in ENVI Classic '.roi' format, which can be accomplished through the ROI tool by going to 'File -> Export -> Export to Classic'. For this sample image, I made a few distinct ROIs and achieved pretty good classification results using the default keyword values. You might also consider adjusting some of these values: http://www.exelisvis.com/...NEURAL_NET_DOIT.html Another thing I would suggest is to test your results using the GUI-based neural net classification tool in the ENVI Toolbox.

    Deleted User



    New Member


    Posts:
    New Member


    --
    17 Mar 2015 11:36 AM
    Thank you for your help, Joe. The problem is a bug in the IDL file. I did not initialize the DIMS array. Once I initialized the DIMS array, and created a point-based ROI file consisting of red, green, and blue points, I got the result I expected.
    You are not authorized to post a reply.