📜 ⬆️ ⬇️

Panoramas: fast or high quality? Both!

Hello!


The article will be for fans of photopans. Shooting and glue panoramas - this is my hobby, the occupation is dusty, fascinating and, importantly, with a spectacular result. I mean that when I demonstrate ready-made panoramas to my acquaintances (non-specialists), then there are no indifferent ones. Unlike, say, from philatelic hobby - once a classmate showed a collection of "Daddy Stamps", the viewing experience was depressing: I didn’t like the funeral of faded pieces of paper between the sheets of the album with thick cardboard pages. Either the collection was not a fountain, or (more likely) the taste and color, we were far from comrades with my classmate's dad.

Uh ... well, yes, panoramas. Hobby _voobsche_ , in my understanding, the occupation is a relaxing, rather pleasant pastime, but after the collection of the first trial series __particle_ I was haunted by the idea that although it is certainly pleasant, it looks more like killing this very time in my performance. (I want to draw your attention to these, at first glance, not noticeable words “in my performance”, all that will be described further - will mainly concern my experience. If other normal people have sharply different results for the better, then let me link there, and I will be grateful to you.)

Handwork


For further reasoning, you need to arm yourself with some source data - for example, a spherical panorama requires about 96 frames with a 48mm lens, which stretches the shooting process for an hour or more. Hour shooting can be quite fascinating to yourself - say, a session for posters with the participation of nice looking people of the opposite sex, but as far as panoramas are concerned, everything is completely different. Who tried to shoot the panel manually knows that this process is more mechanical than creative. Indeed: you jump around a tripod with a camera like an abnormal one, fully concentrating on turning the device to the desired angle and pressing the button so as not to get a “jig”. And so 96 times. And this is for one panorama (and still manage not to forget to take a picture under a tripod - otherwise it will turn out far from camille). Why so much? Because it is necessary. Now I will explain at the moment. It just so happened that I put the first experiments on the camera with the name of a friend of Panasonic, with a 24mm lens at cropping 2, which resulted in 48 equivalent millimeters per full frame. With an equivalent focal length of 48mm, the lens sees 41.1 degrees horizontally and 28.1 vertically (for a 3: 2 aspect ratio). To shoot a spherical panorama horizontally, you need to make (360 / 41.1) + 30% = 12 frames rounded. That is, every 30 degrees .. And vertically (180 / 28.1) + 30% = 9. The overlap of 30% in height and width of adjacent frames was read in the Internet, and is intended to facilitate the process of pasting the panorama.
')
Taking into account the fact that the “topmost floor” as well as the “bottommost” is just one frame (it can of course be photographed 12 times with chamomile, but it may be like another time), it turns out that 7 floors of 12 yes plus anti-aircraft and nadir snapshots. Total 96 frames. Since it is impossible to “broaden” the existing lens - someone else’s camera was taken with the words “I’ll just look and give it away”, and it would be unbearable to reduce this wild 96, there were only a few options left, or rather one: you need to devalue 30%. In fact, after all, 1.3 horizontally multiplied by 1.3 vertically gives an excess area of ​​69%, that is, out of 96 frames, most of them will be cropped when glued together. Here I will omit the matershinnye details on shooting and gluing very tightly, but the meaning is the following: mathematics is good when in pencil on paper, and ruthless practice suggests that the decision to devaluate the overlap was arrogant and erroneous, therefore leaving 96 frames did not work. Gluing these 96 frames by the amount of pleasure corresponds to the hobbies of those strange monks who beat themselves with whips and sing songs.

For assembling panoramas, I use the PTGui program - it has the most convenient interface for hand gluing. It would not have been advertised, no matter how much the experienced and not so great producers of software for panoramas would boast, but so far I have not met programs that can be glued on the machine without any complaints. Yes - there is an automatic mode, yes - it works, but the quality of such an assembly lies somewhere at the level of google-street. To the poet, if we are talking about a good, good-quality panorama, alas, it does not work out to avoid manual work.

The idea of ​​the amount of work can be counted on the fingers: each frame has 4 sides to glue together with its neighbors, on each side in theory you need to put 4-5 points, in fact, about 10. Otherwise, a reproduction on the imperishable Salvador Dali is likely to be obtained. How long does it take to set up one pair of points on adjacent frames? If you “tune in” and click the mouse methodically like a robot, then I get about 3-4 seconds for a couple of points. All together gives about 3-4 hours to build one panorama. It's horrible.

How to live on?


In theory, the time spent in any process can be simply represented as the product of the number of elementary operations and the speed of this elementary operation. So there are two ways to reduce the time spent:

in the case of panoramas, this means that we must strive to reduce the number of shots and to accelerate the processing of each individual picture. Strange as it may seem, but both tasks are overcome with the help of one technical solution - you need to shoot panoramas according to a template. Because if the geometry of one set is indistinguishable from the geometry of another set, then it is enough to reduce only one control set of frames and all the other panoramas are collected only by replacing the original images and do not require re-installation of key points. And for this, in the process of shooting, you always need to turn the camera absolutely exactly. But man can not do this. But here the robot can. Therefore, I began assembling the apparatus for shooting panoramas.

Materiel


The following items were purchased for the device:

Arduino
electronic toy for not very adults - Arduino

L298
Stepper motors control modules compatible with it - 2 pieces

Stepper
three stepper motors (one of them is spare)

Tchugunij
a piece of aluminum (600x150x10mm) from which in my school a man in a blue robe cut out blanks for a frame according to my drawings

Akku
Acid batteries 6V 4.5A

Olympes PEN E-P1
Olympus PEN E-P1 camera (somehow, quite unexpectedly, the Panasonic host remembered that the device should be returned) with a 14-42mm lens (28-84 as it approaches the full frame)

Knopka
and radio button to it

Hama
as well as a dumb tripod.

After the aluminum blanks according to my drawings
Schema
they were ready, it remains only to gather everything in a heap and program Arduin.
The design is simple as mooing: on an aluminum L-shaped form two stepper motors are mounted. And in absolutely shamelessly simple version - no gearboxes, nothing. The axis of the lower engine coincides with (and in truth, it is) the vertical axis of rotation of the installation and is fixed tightly in a specially machined stainless steel shoe, which can be clamped in the head of the tripod. Thus, the entire mass of the device is loaded (I do not own special terms from mechanical engineering, so excuse me if something goes wrong) on ​​the lower motor. The axis of the upper engine is perpendicular to the axis of the lower one and carries the camera through the aluminum adapter (green in the diagram below). The point of intersection of the axes of these motors is inside the lens and coincides with the nodal point of the lens. Parallax, I'm not afraid of you anymore !!!
Plan
From the very beginning, everything was programmed as it should, I did not have any problems with the Arduin software, I don’t know why, so there’s nothing much to write about it. Next, Arduino is connected to the motor controllers and jointly mounted on the lateral surface of the frame (in the figure - to the left on the blue strip). The transmitter of the radio button was broken down and is now controlled by the same Arduna by means of relays hung on free ports. The picture slightly does not coincide with the reality in terms of those gray blocks that personify electronics and batteries. This happened mainly because I had no idea about their true size and missed the scale once every 10. Thus, the electronics were left of the blue vertical, the battery hangs to the right of the burgundy, and the batteries for the radio button are between the lower motor and the burgundy vertical, well and it turned out that inside, and sometimes outside, everything is entangled by wires. Who would have thought…
Everything!

Result


Complete
The result was the following:
The camera is equipped with a 14mm lens with a crop of 2, which gives approximately 28mm in full-frame equivalent. Accordingly, the angle that captures the camera with one shot is about 64 x 48 degrees (the aspect ratio of the frame in this line is not the usual 3: 2 and 4: 3, which is actually more convenient for panoramas). Since the camera is portrait oriented, it turns out 360/48 = 7.5 frames per circle. I do not know how to shoot 7.5 frames, so I rounded up to 8 in a big way and added a couple more to the gluing. It turned out 10 frames per lap. There were three floors along the vertical line (calculations): Horizon, +40 degrees above Horizon, -40 degrees below Horizon, 1 frame vertically up, 1 frame vertically down (which still has to be shot manually). Total 32 frames! Three times less than originally! It takes about 6 seconds per frame, that is, less than 4 minutes for the entire shooting! Hooray!!! The same goes for the panorama assembly. Since the area of ​​the fields that should overlap in the pictures is decently less than 30%, then the assembly of the template project required a trip to a large hangar to my friend. The location was chosen in such a way as to have as many details as possible throughout the room. There was no lack of details in the hangar with openwork thermal armies, a bunch of equipment, suspended walkways and other furniture. I collected the first project very long and hard - almost the whole day, until I decided that the file generated by the sticher does not require retouching in Photoshop. Now the process looks like this - shooting 4 minutes, copying to a computer 1 minute, correction of geometric distortions in Bubble5 2 minutes, assembling HDR images in Photomatix 3 minutes (I forgot to say - without HDR, it turned out that there is almost nothing to catch in panorama, or one hemisphere is white , or another black one), scaling in XnView is 1 minute, stitching in PTGui is 3 minutes. Total 14 minutes for one panorama, and the main work for the operator in the field: press a button and run away, and in the studio: copy files and run programs, the brain does not need to be turned on completely, so while the routine lasts you can calmly scroll something more in your mind important. 14 minutes is better than 4 hours, just the case when the size (of the time spent) matters.

You can see how it ultimately looks like, for example:

sergej-hof.de/panotest
projektinarbeit.de/oldenburg

What for?


The simple answer is to quickly. Honest answer - I wanted to do service for the real estate market in this way, I thought that seeing the interior photo is convenient and useful, and seeing the panorama of the room you are interested in is generally space. But I somehow miscalculated. Brokers nod, praise, but ordering such projects for the money is in no hurry. I suspect the problem is that I am a bad manager, but I haven’t yet found a good one. As for the above, ask questions, I will try to answer them. I understand that the whole essay is chaotic and fragmentary, as it turned out - if you describe each stage more thoroughly, you will get a lot of words, but if you are interested, I’ll write separately about the details you are interested in.

Source: https://habr.com/ru/post/142106/


All Articles