Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > DISP_ROI_GROW_R...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 5570 of 6020
Post > Topic >>

DISP_ROI_GROW_REGION

by "Leonardo R. Sbaraini" <leonardo.computacao@[EMAIL PROTECTED] > Mar 26, 2008 at 08:31 AM

Hello all,

  Example of the problem:

  I need to resize a ROI (oversample) obtained from image1 (100x100)
and show it in image2 (200x200).
  I had success in creating a tool to downsample the ROI (the inverse
problem), but do oversample, the ROI is not exactly what I want, have
somr borders problem.

 Well, seeing the file "envi_all_functions.txt"  that I dont know from
where it cames, theres is method with a sintaxe:

DISP_ROI_GROW_REGION,  p_data, /ASK, /GROUP, /REDO

I ask if someone had used this routine, and dont know how to initiate
p_data.

Maybe I can help showing my code here (to oversample):

; ***************************
;     Growing for x axis
; ***************************
       ; x is a long array with the xaxis positions

        xSize = n_elements(x)

        xNewSize = xSize * intScaleFactor * intScaleFactor

        xNew = lonarr(xNewSize)

        xNew[*] = -1

        currentXnewIndex = 0

        for xi=0, xSize-1 do begin

            numberToWrite = x[xi]

            ; The box side for every x
            for sfRepeater = 0, intScaleFactor-1 do begin

                ; The box side for current element of x  (xi)
                for sfRepeaterNested = 0, intScaleFactor-1 do begin

                    ; Verifying the image limit
                    if numberToWrite lt lngDestinationWidth then begin

                        xNew[currentXnewIndex++] =
numberToWrite

                    endif

                endfor

                numberToWrite++

            endfor

        endfor

        ; Removing invalid indexes
        goodIndex = where(xNew ne -1)
        if goodIndex[0] ne -1 then xNew = xNew[goodIndex]

        x = tem****ary(xNew)


;
***********************************************************************************
 




 2 Posts in Topic:
DISP_ROI_GROW_REGION
"Leonardo R. Sbarain  2008-03-26 08:31:45 
Re: DISP_ROI_GROW_REGION
"Leonardo R. Sbarain  2008-04-04 04:14:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 17:09:51 CDT 2008.