I want to flatten the image of the QR code attached to a cylindrical object

Hi @Red

As far as I know, QR are meant to be used on flat surfaces. Bar codes can be used on cylindrical surfaces.

I don’t know any automatic method to flatten that image.

If your structure is always the same, if your camera will be viewing the cone always from the same position, you can make a map to warp the image to get a flat view.

If images are taken from different positions, first you should make the warp map programmatically, for example starting by detecting qr squares, segmenting them with threshold and ROI, and analysing edge directions.