Conversation started Jan 22, 2011 at 11:31.
Ivo Flipse
Jan 22, 2011 11:31
that seems quire right doesn't it @TomWij
TomWij
Is that my code applied to that image?
Ivo Flipse
subplot(1,2,1),imshow(array(Image.fromarray(a).rotate(-30,resample = Image.BICUBIC)))
a = average of the entire array, so yes
TomWij
It seems right, but I wonder...
Ivo Flipse
btw you don't need an index, I could just say
TomWij
Yeah, feel free to edit, I don't know Python enough to do special stuff. :)
...it looks odd that the background color is darker...
Ivo Flipse
Jan 22, 2011 11:34
newarrayA = []
for frame in arrayA:
newarrayA.append(array(Image.fromarray(frame).rotate(-30,resample = Image.BICUBIC)))
TomWij
Perhaps it has to do something with the resampling?
Ivo Flipse
meeh, the indents are going
yeah, all of a sudden there are negative values :\
lol there are even values of -18
TomWij
And how does it know how to fill the corners... :-S
Ivo Flipse
pad it with zeros
TomWij
Ah, could make sense.
Ivo Flipse
Jan 22, 2011 11:37
I could put my array in a large one, so it's rotating in free space (metaphorically speaking)
TomWij
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...
Ivo Flipse
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
TomWij
Maybe, also make sure the resampling is right.
Ivo Flipse
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)
TomWij
Placing it in a bigger image and placing the rear toe in the middle might not be a bad idea then
Ivo Flipse
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
TomWij
Although you'll have to find the borders of the rotated version to get it back into a small image.
Ivo Flipse
well that shouldn't be too hard
just check for rows/cols that are empty
TomWij
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
Ivo Flipse
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.
all rooms
Paw rotation.
Jan '11
22
Root Access
For all you Super Users out there. You have backups, right?
6
context of the conversation
join this room
about this room
Participants
Ivo Flipse
63%
TomWij
36%
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile