From: Jared on 9 Mar 2010 02:27 regarding the use of impyramid : does it work for binary images i.e images coded between 0 and 1 ? Or should the image be converted to 0 and 255 scale? Thanks !!
From: Ashish Uthama on 9 Mar 2010 09:21 On Tue, 09 Mar 2010 02:27:04 -0500, Jared <tr11112001(a)yahoo.com> wrote: > regarding the use of impyramid : does it work for binary images i.e > images coded between 0 and 1 ? Or should the image be converted to 0 > and 255 scale? Thanks !! The section 'class support' of 'help impyramid' indicates that the function works for logicals (0 and 1) and uint8's (0-255). Output class is the same as the input. Choose what works for your application. If you want logical output, stick with logical inputs. However, if you want your output to be grayscale, convert your binary image to 0-255 scale. >> impyramid(magic(10)>50,'reduce') ans = 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 1 0 0 >> impyramid((magic(10)>50)*255,'reduce') ans = 229.1016 84.6680 80.6836 239.0625 175.3125 179.2969 109.5703 85.6641 239.0625 175.3125 159.3750 114.5508 110.5664 169.3359 145.4297 69.7266 149.4141 165.3516 29.8828 85.6641 55.7813 155.3906 171.3281 15.9375 79.6875
From: Jared on 10 Mar 2010 00:49 Awesome! Thanks! "Ashish Uthama" <first.last(a)mathworks.com> wrote in message <op.u9a0tes0a5ziv5(a)uthamaa.dhcp.mathworks.com>... > On Tue, 09 Mar 2010 02:27:04 -0500, Jared <tr11112001(a)yahoo.com> wrote: > > > regarding the use of impyramid : does it work for binary images i.e > > images coded between 0 and 1 ? Or should the image be converted to 0 > > and 255 scale? Thanks !! > > > The section 'class support' of 'help impyramid' indicates that the > function works for logicals (0 and 1) and uint8's (0-255). > Output class is the same as the input. > > Choose what works for your application. If you want logical output, stick > with logical inputs. However, if you want your output to be grayscale, > convert your binary image to 0-255 scale. > > > >> impyramid(magic(10)>50,'reduce') > > ans = > > 1 0 0 1 1 > 1 0 0 1 1 > 1 0 0 1 1 > 0 1 1 0 0 > 0 1 1 0 0 > > >> impyramid((magic(10)>50)*255,'reduce') > > ans = > > 229.1016 84.6680 80.6836 239.0625 175.3125 > 179.2969 109.5703 85.6641 239.0625 175.3125 > 159.3750 114.5508 110.5664 169.3359 145.4297 > 69.7266 149.4141 165.3516 29.8828 85.6641 > 55.7813 155.3906 171.3281 15.9375 79.6875
|
Pages: 1 Prev: Calling Matlab functions from java Next: fingerprint matching |