[Tutor] [tutor] Finding image statistics
varsha.purohit at gmail.com
Mon Mar 10 03:19:49 CET 2008
You both were right... i type casted it to int and it works with
this..Thanks for catching the error !!!. but i had a question.. i want to
find area of all the cells which i obtained by using
imagechops.difference.... so should i multiply each cell with cellsize or
should i add all the cells and multiply it will the cellsize...
accd to me if i have a square of 2X2 then area is 4.
if i need to find area of 10such squares then i can just find area for one
and multiply it with 10.
I donno which approach i should follow.....
should i multiply each pixel with cellsize or first i add up all of them and
multiply the cumulative result with cellsize............
On Sun, Mar 9, 2008 at 6:41 PM, Kent Johnson <kent37 at tds.net> wrote:
> Varsha Purohit wrote:
> > Hello All,
> > I had posted this question in this community. I have a trouble.
> > Actually in my application i need to multiply the resultant value i am
> > getting with a cellsize. I am getting this cellsize by reading an ascii
> > file's header. But when i am trying to multiply it with the result of
> > imagestat i am getting an error.
> > temp= hdr.strip().split() # temp is a list which is ['cellsize',
> > '127']
> > cellsize = temp
> Here cellsize is a string, not an integer. Try
> cellsize = int(temp)
> > i am getting an error that i cannot combine imagestat with cellsize and
> > i cannot multiply it like that.
> It's very helpful if you show us the exact error, including the
> traceback. Just copy the entire error message and paste it into your
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor