Conversation started Jan 22, 2011 at 11:31.
Jan 22, 2011 11:31
that seems quire right doesn't it @TomWij
Is that my code applied to that image?
subplot(1,2,1),imshow(array(Image.fromarray(a).rotate(-30,resample = Image.BICUBIC)))
a = average of the entire array, so yes
It seems right, but I wonder...
btw you don't need an index, I could just say
Yeah, feel free to edit, I don't know Python enough to do special stuff. :)
...it looks odd that the background color is darker...
Jan 22, 2011 11:34
newarrayA = []
for frame in arrayA:
newarrayA.append(array(Image.fromarray(frame).rotate(-30,resample = Image.BICUBIC)))
Perhaps it has to do something with the resampling?
meeh, the indents are going
yeah, all of a sudden there are negative values :\
lol there are even values of -18
And how does it know how to fill the corners... :-S
pad it with zeros
Ah, could make sense.
Jan 22, 2011 11:37
I could put my array in a large one, so it's rotating in free space (metaphorically speaking)
Yeah, that's probably it, zeros are dark blue then...
Could make a difference. :-)
Because it's odd that there are zeros in the middle now
While the toes themselves seem to be still okay...
hmmm it seems right though, cutting off everything below 0
besides, I would first scale up the image
each pixel into 4 or so
then rotate it
Maybe, also make sure the resampling is right.
because now the data is pretty crude, a rotation of 10 degrees means that only one pixel has to move
though something that's not completely right, is that I'd want it to rotate around a certain point (the rear toe)
Placing it in a bigger image and placing the rear toe in the middle might not be a bad idea then
Jan 22, 2011 11:43
hmm right, if it's in the middle of the image it would rotate around that point
that should be doable
Although you'll have to find the borders of the rotated version to get it back into a small image.
well that shouldn't be too hard
just check for rows/cols that are empty
But I suppose the data outside won't change so shouldn't be so hard to loop over the array to find the most left/right/top/bottom and then create a 15x15 (or whatever) again
I haven't decided how to use the result yet either
but after I've calculated the step width, length, I'm no longer interested in what's around the paw
so I can transform things a bit
 
Conversation ended Jan 22, 2011 at 11:47.