#How would you approach reading jpg files and scaling them in zig?
1 messages · Page 1 of 1 (latest)
Although this doesnt seem to support exif data, or a basic simple image crop, this seems like a partial solution:
Analizing camera angles is a hard problem to solve on it’s own, I believe you should do some research about image processing, find some papers. Of the top of my head, using the FFT might give you some insights.
The camera roation is usually inside the EXIF header. Its just a matter of reading the exif data (which zigimg doesnt support unfortunately)
How does the camera knows how much it has rotated ? Is there a sensor inside ?
Yes, its reasonably common for modern cameras to want to save processing power. They store the image bytes from left to right , top to bottom from directly from the sesor, and then if the camera was sideways or upside down, stuff a rotation number in the exif header.
This saves hardware (or software) having to reverse or flip all the bytes if the camera is upside down.