How to get height and width from a pix?
Pix *image = pixRead((input).c_str());
Use pixGetWidth and pixGetHeight:
Pix *image = pixRead((input).c_str()); int width = pixGetWidth(image); int height = pixGetHeight(image);