Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stacked_images #9

Open
dougler opened this issue Sep 4, 2020 · 4 comments
Open

stacked_images #9

dougler opened this issue Sep 4, 2020 · 4 comments

Comments

@dougler
Copy link

dougler commented Sep 4, 2020

I enteredcode from book. When I ran the code..I got "MemoryError"
while processing the
green_data.appendlist(image.getdata(1)))

so I copied the code from the github file
got same error with the blue_data.append ...line.
looked for a n errata for pg.338 but found none.
??

@rlvaugh
Copy link
Owner

rlvaugh commented Sep 16, 2020

dougler, I ran the code on my system and encountered no problems. I'm using a Dell XPS laptop with an Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz 2.40GHz and 8 GB RAM (7.85 GB usable). Running Windows 10 64 bit.

After first running the crop_n_scale_images.py code, you may want to try restarting your computer and then running the stacking program. Shut down your browser and any other non-essential programs to reduce memory load.

@dougler
Copy link
Author

dougler commented Sep 16, 2020 via email

@rlvaugh
Copy link
Owner

rlvaugh commented Sep 16, 2020

Doug, there are so many platforms, Python versions, operating system versions, etc. that's it's impossible to anticipate every problem. I pay a guy to run everything on a Mac (I use Windows) and he finds a lot of stuff, but that's just for Catalina. If he used Mojave or another release he would find a different set of problems.

I'm glad you got it to run. To see the results of using all the images, take a look at the PDFs for Figure 15-9 and Figure 15-10 in the Chapter 15 folder on github. The red spot is more visible than in individual frames, but like I say in the book, it won't win any photography prizes. The starting data was too noisy, but then that was the point.

I upgraded to Python 3 64 bit a few years ago and encountered no problems running older Python code, so if you do upgrade, hopefully you won't encounter any issues.

I'm glad you're enjoying the book. Real-World Python is out next month (Covid willing). You can preview it on Amazon. It's a similar format to Impractical Python Projects but uses more sophisticated tools such as OpenCV (computer vision) and pandas (data analysis), among others. Your current set-up may present problems with the computer vision projects in Chapters 9 and 10.

@dougler
Copy link
Author

dougler commented Sep 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants