From: Oliver Woodford on 29 May 2010 08:33 "gerarrd " <bondpiece007(a)yahoo.co.in> wrote in message <htqi15$8td$1(a)fred.mathworks.com>... > "Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <htoh99$4f5$1(a)fred.mathworks.com>... > > "gerarrd" wrote: > > > i'm analyzing a video(frame by frame) and would like to reduce computational time by getting only a region(that encompasses my roi) in the subsequent frames... > > > > Why do you get the ROI from the figure and not from the image data itself (which you must have to display anyway)? E.g. > > roi = im(38:58,105:125,:); > > in every frame i have to do a sequence of operations whose result is the roi! now what i'd like to do is ...to take only a restricted portion of the frame as i proceed ...its hence that after finding out the coordinates of the roi in the base frame...i go to analyze the next one using only a portion built around the area where the roi has been detected in the previous frame....thats y i use getframe(handle, [rect area encompassing the roi detected in d previous frame])...is there anything better that can help me ? It's still not clear to me why you need to get the ROI from the figure on screen, and not the image data. You do the operations to get the ROI [startx starty widthx widthy], then you select this from the new image stored in variable im using: roi = im(starty:starty+widthy-1,startx:startx+widthx-1,:); Why do you prefer to get it from the screen?
From: gerarrd on 30 May 2010 01:56 "Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <htr1i2$jgt$1(a)fred.mathworks.com>... > "gerarrd " <bondpiece007(a)yahoo.co.in> wrote in message <htqi15$8td$1(a)fred.mathworks.com>... > > "Oliver Woodford" <o.j.woodford.98(a)cantab.net> wrote in message <htoh99$4f5$1(a)fred.mathworks.com>... > > > "gerarrd" wrote: > > > > i'm analyzing a video(frame by frame) and would like to reduce computational time by getting only a region(that encompasses my roi) in the subsequent frames... > > > > > > Why do you get the ROI from the figure and not from the image data itself (which you must have to display anyway)? E.g. > > > roi = im(38:58,105:125,:); > > > > in every frame i have to do a sequence of operations whose result is the roi! now what i'd like to do is ...to take only a restricted portion of the frame as i proceed ...its hence that after finding out the coordinates of the roi in the base frame...i go to analyze the next one using only a portion built around the area where the roi has been detected in the previous frame....thats y i use getframe(handle, [rect area encompassing the roi detected in d previous frame])...is there anything better that can help me ? > > It's still not clear to me why you need to get the ROI from the figure on screen, and not the image data. > > You do the operations to get the ROI [startx starty widthx widthy], then you select this from the new image stored in variable im using: > roi = im(starty:starty+widthy-1,startx:startx+widthx-1,:); > > Why do you prefer to get it from the screen? thanks mate...chuck getframe ...thought it'd consume less time..am getting results with a simple cropping like u said though... cheers
First
|
Prev
|
Pages: 1 2 Prev: dec2binvec is not giving the correct value Next: Find repeated elements in different arrays |