Hello all,
I have another problem while using ROI_THRESH_DOIT'. I get error msg: 'Unable to allocate memory to make array'. This is because there are many pixes in one threshold range and then RAM fails to handle such a long array. Does some one has some idea how to handle it, I also changed in the configuration file but it doesnt help much.
I want to do supervised classification. I also tried with polygon roi by create and define but may be I am not doing it right.
envi_open_data_file, 'test.img', r_fid=fid
if (fid eq -1) then begin
envi_batch_exit
return
endif
envi_file_query, fid, dims=dims, nb=nb
roi_id1 = envi_create_roi(color=4, name='roi1', ns=ns, nl=nl)
xpts = [8406,9226,8406,9226]
ypts = [7688,7688,8559,8559]
envi_define_roi, roi_id1, /polygon, xpts=xpts, ypts=ypts
roi_id2 = envi_create_roi(color=3, name='roi2', ns=ns, nl=nl)
xpts = [3486,4203,3486,4203]
ypts = [6714,6714,8149,8149]
envi_define_roi, roi_id2, /polygon, xpts=xpts, ypts=ypts
roi_id3 = envi_create_roi(color=2, name='roi3', ns=ns, nl=nl)
xpts = [5486,4203,5486,4203]
ypts = [6714,6714,9149,9149]
envi_define_roi, roi_id3, /polygon, xpts=xpts, ypts=ypts
roi_ids = envi_get_roi_ids(fid = fid)
print, 'ROI: ', n_elements(roi_ids)
It always give 1 roi only, but I need all defined rois to use them as a traininng set for classification..
Can some one correct me, in creating rois for different classes I need. Hope to get your support. Thanks a million..
Alka
|