Picture Tilt
So, this program is supposed to tilt a picture, make it look like it's being held at an angle. It does a pretty good job, but has a serious problem with the scanning. It will, at times, skip over sections of the picture, ruining the effect. Is there any way to make sure it doesn't skip?
Thanks in advance.
Offline
I first want to say that this is very impressive. Nice job! I believe that the skipping is because of turbo mode. I'm not exactly sure what turbo mode does, but it causes things to be rather inaccurate and skip around when they move. As a result, the scanning sprite is probably jumping over some pixels. You'll notice that if you run the project in normal speed, it reproduces the image just fine.
Offline
Harakou wrote:
I first want to say that this is very impressive. Nice job! I believe that the skipping is because of turbo mode. I'm not exactly sure what turbo mode does, but it causes things to be rather inaccurate and skip around when they move. As a result, the scanning sprite is probably jumping over some pixels. You'll notice that if you run the project in normal speed, it reproduces the image just fine.
Nope, I tried it out side turbo mode, still misses around 300 pixels. Depending on which picture it is, it runs better if it's the one of the two guys and not the cat one.
Offline
Reverberated3 wrote:
Harakou wrote:
I first want to say that this is very impressive. Nice job! I believe that the skipping is because of turbo mode. I'm not exactly sure what turbo mode does, but it causes things to be rather inaccurate and skip around when they move. As a result, the scanning sprite is probably jumping over some pixels. You'll notice that if you run the project in normal speed, it reproduces the image just fine.
Nope, I tried it out side turbo mode, still misses around 300 pixels. Depending on which picture it is, it runs better if it's the one of the two guys and not the cat one.
Hm... testing. Give me a minute.
Update: Hm, I'm seeing the problem too. One thing I'm seeing is that the list for the Scratch cat image should be 10,605 items long, but it's only 9,802 lines long. Let me see if that's consistent.
Update 2: 9,802 is consistent, making me suspect that this is a code issue. It may be a problem with the color sensing; let me check that and get back to you.
Last edited by Harakou (2011-03-08 21:24:09)
Offline
Thanks, I think i might have a method that would work to solve it, but I'll wait to see what you find.
Offline
Yup, it was your color sensing. I added a conditional to the end that added a 6 to the list is it was touching none of the colors you had listed, and the number of items came out perfectly. That would also explain why the Scratch cat was the only one not working, because the other image didn't contain that color. (Still trying to figure out which color that is.)
Last edited by Harakou (2011-03-08 21:35:19)
Offline
Harakou wrote:
Yup, it was your color sensing. I added a conditional to the end that added a 6 to the list is it was touching none of the colors you had listed, and the number of items came out perfectly. That would also explain why the Scratch cat was the only one not working, because the other image didn't contain that color. (Still trying to figure out which color that is.)
Thanks! I think it's just a slight difference, that happens all the time in paint. If your method doesn't completely work, I would just use a counting variable to make sure the list is the right length.
Offline
Why does this look like my 3D height map creator?
Black and white image to list converter
http://scratch.mit.edu/projects/what-the/1529978
Black and white image in list form to 3D map. (Remove one block and it does the exact same thing as what yours does) RrrRr
http://scratch.mit.edu/projects/what-the/1530181
Explain yourself. Nowz.
Offline
what-the wrote:
Why does this look like my 3D height map creator?
Black and white image to list converter
http://scratch.mit.edu/projects/what-the/1529978
Black and white image in list form to 3D map. (Remove one block and it does the exact same thing as what yours does) RrrRr
http://scratch.mit.edu/projects/what-the/1530181
Explain yourself. Nowz.
This seems different to me. His just takes an image and tilts it, whereas yours converts the colors in an elevation map to an array and renders a 3D height map.
Offline
Harakou wrote:
what-the wrote:
Why does this look like my 3D height map creator?
Black and white image to list converter
http://scratch.mit.edu/projects/what-the/1529978
Black and white image in list form to 3D map. (Remove one block and it does the exact same thing as what yours does) RrrRr
http://scratch.mit.edu/projects/what-the/1530181
Explain yourself. Nowz.This seems different to me. His just takes an image and tilts it, whereas yours converts the colors in an elevation map to an array and renders a 3D height map.
![]()
Download the 3D height map and remove the "change y by" in the final loop under the stamp. Now it does the same thing
Look at the code. It is layed out very similarly. (You must download all three projects)
Last edited by what-the (2011-03-08 23:31:30)
Offline
It is partially influenced by your project, but mainly in the idea of using a grayscale. It's easier than scanning tons of different colors.
Offline
Reverberated3 wrote:
It is partially influenced by your project, but mainly in the idea of using a grayscale. It's easier than scanning tons of different colors.
Hmm. I see a lot alike.
Offline