Full writeup coming soon! (I'll comment here with a link, in case it doesn't make front-page.)
Getting the lines is not the hard part, but rather, reasoning about the regions enclosed by them to find the panels. I'm not totally satisfied with my current solution (it's a bit hacky), so I'll try to tweak it a bit, but in any case, results will be posted soon.