It's different. When doing something as your described in a public library, you're clearly breaking the library rules while you're in their premises and can be caught, very different than having that being done by a software your ran from your home. The former also does not scale to be economically profitable, where the later can be hacked once and ran to scrape thousands of books, basically a mass reproduction of books illegally.
1: I'd suggest you'd check out the book and bring it home with you and do the scanning at home.
2: This is not Google's first rodeo when it comes to scraping. I'd be surprised if you got more than a few days into the described process, so no, it certainly does not scale.