10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-60DBA025-8FA0-5DF2-90D0-744A016998EE" xml:lang="en"><title>Panoramic |
12 <concept id="GUID-60DBA025-8FA0-5DF2-90D0-744A016998EE" xml:lang="en"><title>Panoramic |
13 Stitching Guide</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 Stitching Guide</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <p>This document introduces you to the panoramic stitching functionality. </p> |
14 <p>This document introduces you to the panoramic stitching functionality. </p> |
15 <section id="GUID-3333CA2A-EF84-5E7B-B9BE-8FF00523897F-GENID-1-8-1-18-1-1-5-1-6-1-12-1-4-1-3-1-4-1-3-1-2-2"><title>Purpose</title> <p>Panoramic |
15 <section id="GUID-3333CA2A-EF84-5E7B-B9BE-8FF00523897F-GENID-1-10-1-19-1-1-5-1-6-1-11-1-4-1-3-1-4-1-3-1-2-2"><title>Purpose</title> <p>Panoramic |
16 stitching involves combining a collection of images into a single image. </p> </section> |
16 stitching involves combining a collection of images into a single image. </p> </section> |
17 <section><title>Panoramic stitching overview</title> <p>The panorama image |
17 <section><title>Panoramic stitching overview</title> <p>The panorama image |
18 is created by stitching a collection of several separate image into one large |
18 is created by stitching a collection of several separate image into one large |
19 image. The panoramic stitching process is done by, </p> <ul> |
19 image. The panoramic stitching process is done by, </p> <ul> |
20 <li id="GUID-0DA59FD4-B817-5B51-8E83-F56FC42E1675"><p>image registration </p> </li> |
20 <li id="GUID-0DA59FD4-B817-5B51-8E83-F56FC42E1675"><p>image registration </p> </li> |
181 <li id="GUID-A490A649-B910-5E1C-B317-EC5627547EF7"><p>Reset the <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita"><apiname>CVFTracker</apiname></xref> for |
181 <li id="GUID-A490A649-B910-5E1C-B317-EC5627547EF7"><p>Reset the <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita"><apiname>CVFTracker</apiname></xref> for |
182 the next image, using <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita#GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352/GUID-AE707DEA-4747-3A1A-8C6F-8163F1DF0584"><apiname>CVFTracker::Reset()</apiname></xref>. </p> <p>In order |
182 the next image, using <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita#GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352/GUID-AE707DEA-4747-3A1A-8C6F-8163F1DF0584"><apiname>CVFTracker::Reset()</apiname></xref>. </p> <p>In order |
183 to capture many images to be stitched into a single panorama image, repeat |
183 to capture many images to be stitched into a single panorama image, repeat |
184 the steps 5, 6 and 7. </p> </li> |
184 the steps 5, 6 and 7. </p> </li> |
185 </ol> <fig id="GUID-7F48B2F5-D65B-52EC-8412-F3F56A5EE8E8"> |
185 </ol> <fig id="GUID-7F48B2F5-D65B-52EC-8412-F3F56A5EE8E8"> |
186 <image href="GUID-470FAFE8-2246-5E91-9F01-6CC95F975E54_d0e310270_href.jpg" placement="inline"/> |
186 <image href="GUID-470FAFE8-2246-5E91-9F01-6CC95F975E54_d0e304255_href.jpg" placement="inline"/> |
187 </fig> <p><b>Panorama |
187 </fig> <p><b>Panorama |
188 stitching </b> </p> <p>The <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita"><apiname>CVFTracker</apiname></xref> helps to decide when |
188 stitching </b> </p> <p>The <xref href="GUID-0D12EA24-3BF5-3BEA-B0EA-CEB89D49D352.dita"><apiname>CVFTracker</apiname></xref> helps to decide when |
189 to capture each of the full resolution images using the camera. The images |
189 to capture each of the full resolution images using the camera. The images |
190 can then be passed to CImagePanorama and the stitching is done. The high level |
190 can then be passed to CImagePanorama and the stitching is done. The high level |
191 steps to do panorama stitching are listed below: </p> <ol id="GUID-763005A3-4098-534F-9CA1-E2F8654C95BD"> |
191 steps to do panorama stitching are listed below: </p> <ol id="GUID-763005A3-4098-534F-9CA1-E2F8654C95BD"> |
196 the CVFTracker. </p> </li> |
196 the CVFTracker. </p> </li> |
197 <li id="GUID-BC35AEEF-206E-5830-909E-07F645C2E063"><p>When all images have |
197 <li id="GUID-BC35AEEF-206E-5830-909E-07F645C2E063"><p>When all images have |
198 been captured you can render the stitched image to file, image buffer, CFbsBitmap |
198 been captured you can render the stitched image to file, image buffer, CFbsBitmap |
199 or image frame using <xref href="GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4.dita#GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4/GUID-A098A70C-050C-3592-BC37-E849A81890F2"><apiname>CImagePanorama::RenderL()</apiname></xref>. </p> </li> |
199 or image frame using <xref href="GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4.dita#GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4/GUID-A098A70C-050C-3592-BC37-E849A81890F2"><apiname>CImagePanorama::RenderL()</apiname></xref>. </p> </li> |
200 </ol> <fig id="GUID-B5F7149F-1FB9-535E-9212-7C9E23B9347B"> |
200 </ol> <fig id="GUID-B5F7149F-1FB9-535E-9212-7C9E23B9347B"> |
201 <image href="GUID-A8C80AA1-42CF-5866-B223-FCE1AEC9DF63_d0e310320_href.jpg" placement="inline"/> |
201 <image href="GUID-A8C80AA1-42CF-5866-B223-FCE1AEC9DF63_d0e304305_href.jpg" placement="inline"/> |
202 </fig> <p><b>User Interface</b> </p> <p>Provide a good user interface (UI) application |
202 </fig> <p><b>User Interface</b> </p> <p>Provide a good user interface (UI) application |
203 for the <xref href="GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4.dita"><apiname>CImagePanorama</apiname></xref> is crucial. An example of UI design |
203 for the <xref href="GUID-4DBD1F07-42C5-3CD7-B809-A391F315E0D4.dita"><apiname>CImagePanorama</apiname></xref> is crucial. An example of UI design |
204 is described below, which gives you a robust and easy application for generating |
204 is described below, which gives you a robust and easy application for generating |
205 panorama images. </p> <p><b>How |
205 panorama images. </p> <p><b>How |
206 to shoot a panorama </b> </p> <p>The steps to be followed for shooting a panorama |
206 to shoot a panorama </b> </p> <p>The steps to be followed for shooting a panorama |
210 scene. </p> <p> <b>Note:</b> You must try not to move the mobile phone, but |
210 scene. </p> <p> <b>Note:</b> You must try not to move the mobile phone, but |
211 only rotate it. You see in the below diagram the camera is sweep in a clockwise |
211 only rotate it. You see in the below diagram the camera is sweep in a clockwise |
212 direction from left-to-right. The rotation is made around the imagined axis |
212 direction from left-to-right. The rotation is made around the imagined axis |
213 through mobile (axis of rotation in the image). A panorama image covers approximately |
213 through mobile (axis of rotation in the image). A panorama image covers approximately |
214 a 100 degree field of view. </p> <fig id="GUID-8562E235-6D10-5097-A888-E27EE6D4E498"> |
214 a 100 degree field of view. </p> <fig id="GUID-8562E235-6D10-5097-A888-E27EE6D4E498"> |
215 <image href="GUID-7B3578A0-7E2E-508A-A355-A39AEE0307AD_d0e310357_href.jpg" placement="inline"/> |
215 <image href="GUID-7B3578A0-7E2E-508A-A355-A39AEE0307AD_d0e304342_href.jpg" placement="inline"/> |
216 </fig> </li> |
216 </fig> </li> |
217 <li id="GUID-16CA0CFB-9D17-573C-9D7B-FEDBCFF4044C"><p> <b>Application Start</b> </p> <p>When |
217 <li id="GUID-16CA0CFB-9D17-573C-9D7B-FEDBCFF4044C"><p> <b>Application Start</b> </p> <p>When |
218 you launch the application the UI appears as shown in the below diagram. </p> <fig id="GUID-4A6082E2-1B7F-5A48-8FC5-7BC2786987B7"> |
218 you launch the application the UI appears as shown in the below diagram. </p> <fig id="GUID-4A6082E2-1B7F-5A48-8FC5-7BC2786987B7"> |
219 <image href="GUID-0E55E007-913C-56DA-8BEF-7EC00FFCCE51_d0e310373_href.jpg" placement="inline"/> |
219 <image href="GUID-0E55E007-913C-56DA-8BEF-7EC00FFCCE51_d0e304358_href.jpg" placement="inline"/> |
220 </fig> <p>Here the screen area shows the viewfinder image. When you sweep |
220 </fig> <p>Here the screen area shows the viewfinder image. When you sweep |
221 the mobile, several images are captured and then the images are stitched to |
221 the mobile, several images are captured and then the images are stitched to |
222 create a panorama image. </p> </li> |
222 create a panorama image. </p> </li> |
223 <li id="GUID-FE8D49DB-26CC-5546-A05D-B46045894313"><p> <b>Capture a panorama |
223 <li id="GUID-FE8D49DB-26CC-5546-A05D-B46045894313"><p> <b>Capture a panorama |
224 image during tracking</b> </p> <p>When you choose to capture a panorama image |
224 image during tracking</b> </p> <p>When you choose to capture a panorama image |
225 the UI changes, which is shown in the below diagram. </p> <fig id="GUID-930C8F54-4C13-50AC-B700-9D889FFE9DC7"> |
225 the UI changes, which is shown in the below diagram. </p> <fig id="GUID-930C8F54-4C13-50AC-B700-9D889FFE9DC7"> |
226 <image href="GUID-9AB5481B-C321-56C9-937D-2397AA80DE8E_d0e310392_href.jpg" placement="inline"/> |
226 <image href="GUID-9AB5481B-C321-56C9-937D-2397AA80DE8E_d0e304377_href.jpg" placement="inline"/> |
227 </fig> <p>In the above diagram you see three different boxes named 1, 2 and |
227 </fig> <p>In the above diagram you see three different boxes named 1, 2 and |
228 3 which represent the position of the camera. The blue box representation |
228 3 which represent the position of the camera. The blue box representation |
229 changes according to the rotation of the mobile phone. </p> <p>The boxes shown |
229 changes according to the rotation of the mobile phone. </p> <p>The boxes shown |
230 in the above diagram is for illustrative purpose, so that it can be down scaled |
230 in the above diagram is for illustrative purpose, so that it can be down scaled |
231 for viewfinder image size. The total panorama coverage area box is estimated |
231 for viewfinder image size. The total panorama coverage area box is estimated |
305 <li id="GUID-C7848E42-74B4-56D2-BB7B-2F20A4D30D32"><p> <b>User interface updating |
305 <li id="GUID-C7848E42-74B4-56D2-BB7B-2F20A4D30D32"><p> <b>User interface updating |
306 details </b> </p> <p>The UI design detail is shown in step by step process. |
306 details </b> </p> <p>The UI design detail is shown in step by step process. |
307 They are as follows: </p> <ul> |
307 They are as follows: </p> <ul> |
308 <li id="GUID-99D23225-ECF9-5A34-ADAA-4E0A2326D768"><p>The total panorama coverage |
308 <li id="GUID-99D23225-ECF9-5A34-ADAA-4E0A2326D768"><p>The total panorama coverage |
309 area is divided into four different image areas: </p> <fig id="GUID-0808E657-6313-510C-9EB6-F4D49722229B"> |
309 area is divided into four different image areas: </p> <fig id="GUID-0808E657-6313-510C-9EB6-F4D49722229B"> |
310 <image href="GUID-023D30F0-C1E8-5E09-92AD-C5A7963DCF70_d0e310453_href.jpg" placement="inline"/> |
310 <image href="GUID-023D30F0-C1E8-5E09-92AD-C5A7963DCF70_d0e304438_href.jpg" placement="inline"/> |
311 </fig> </li> |
311 </fig> </li> |
312 <li id="GUID-D06A8B59-81EE-5420-A3AE-FB036B7CE3F4"><p>When you choose to capture |
312 <li id="GUID-D06A8B59-81EE-5420-A3AE-FB036B7CE3F4"><p>When you choose to capture |
313 a panorama image the following steps are performed. The first image is captured |
313 a panorama image the following steps are performed. The first image is captured |
314 at position 0. The UI looks as follows: </p> <fig id="GUID-A17F50EC-3241-56CA-B96A-59515EAF161B"> |
314 at position 0. The UI looks as follows: </p> <fig id="GUID-A17F50EC-3241-56CA-B96A-59515EAF161B"> |
315 <image href="GUID-C2D99C88-09C7-55FA-AF95-3F689BA27484_d0e310463_href.jpg" placement="inline"/> |
315 <image href="GUID-C2D99C88-09C7-55FA-AF95-3F689BA27484_d0e304448_href.jpg" placement="inline"/> |
316 </fig> </li> |
316 </fig> </li> |
317 <li id="GUID-BF4A2D67-EF8D-5F72-B2C2-9DC79E319023"><p>When you rotate the |
317 <li id="GUID-BF4A2D67-EF8D-5F72-B2C2-9DC79E319023"><p>When you rotate the |
318 mobile phone clockwise, the blue box moves to the right using the translation |
318 mobile phone clockwise, the blue box moves to the right using the translation |
319 information from <xref href="GUID-27BD164A-9283-3BE0-A0BF-A475539D86EA.dita"><apiname>CPanoramaTransform</apiname></xref>. At the same time the |
319 information from <xref href="GUID-27BD164A-9283-3BE0-A0BF-A475539D86EA.dita"><apiname>CPanoramaTransform</apiname></xref>. At the same time the |
320 vibrator is set on to give direct feedback for the tracking process. When |
320 vibrator is set on to give direct feedback for the tracking process. When |
321 the blue box and the grey box (which represent the position to capture the |
321 the blue box and the grey box (which represent the position to capture the |
322 next image) coincide, the blue box turns into a filled blue box and the vibrator |
322 next image) coincide, the blue box turns into a filled blue box and the vibrator |
323 stops. You then known that the next image is captured. At this moment the |
323 stops. You then known that the next image is captured. At this moment the |
324 camera must be steady. </p> <p>After second image is captured the blue box |
324 camera must be steady. </p> <p>After second image is captured the blue box |
325 is moving again and vibrator is set-on. The UI looks as follows: </p> <fig id="GUID-C6E583BB-EE47-52EE-BBFB-D7EE37156C12"> |
325 is moving again and vibrator is set-on. The UI looks as follows: </p> <fig id="GUID-C6E583BB-EE47-52EE-BBFB-D7EE37156C12"> |
326 <image href="GUID-B985B750-9B42-55ED-B7E4-41B06B44C365_d0e310480_href.jpg" placement="inline"/> |
326 <image href="GUID-B985B750-9B42-55ED-B7E4-41B06B44C365_d0e304465_href.jpg" placement="inline"/> |
327 </fig> <p>Again, you rotate the mobile clockwise until the two boxes coincide |
327 </fig> <p>Again, you rotate the mobile clockwise until the two boxes coincide |
328 and vibrator stops; third image then captured. After this, the UI looks as |
328 and vibrator stops; third image then captured. After this, the UI looks as |
329 follows: </p> <fig id="GUID-FD9D81DA-E675-5C9C-BA6E-4E7DCE6F46D9"> |
329 follows: </p> <fig id="GUID-FD9D81DA-E675-5C9C-BA6E-4E7DCE6F46D9"> |
330 <image href="GUID-9E12593C-38EF-5052-A2E8-0AB25EEFF4D0_d0e310488_href.jpg" placement="inline"/> |
330 <image href="GUID-9E12593C-38EF-5052-A2E8-0AB25EEFF4D0_d0e304473_href.jpg" placement="inline"/> |
331 </fig> <p>You rotate the mobile phone until the boxes coincide and the fourth |
331 </fig> <p>You rotate the mobile phone until the boxes coincide and the fourth |
332 (last) image is captured. </p> <p> <b>Note:</b> If the mobile phone rotation |
332 (last) image is captured. </p> <p> <b>Note:</b> If the mobile phone rotation |
333 deviates from chosen (clockwise) direction or translates up and down, the |
333 deviates from chosen (clockwise) direction or translates up and down, the |
334 blue box indicates this, and you must correct the mobile phone for the wrong |
334 blue box indicates this, and you must correct the mobile phone for the wrong |
335 movement. </p> <p>At this point the stitched image can be saved or you can |
335 movement. </p> <p>At this point the stitched image can be saved or you can |
336 reset the camera, to create another panorama image: </p> <fig id="GUID-1A527BEA-0C50-5910-9525-75336C02B2C9"> |
336 reset the camera, to create another panorama image: </p> <fig id="GUID-1A527BEA-0C50-5910-9525-75336C02B2C9"> |
337 <image href="GUID-8E2303E9-DB60-5F38-A4D4-8BF8F7A1EF9F_d0e310505_href.jpg" placement="inline"/> |
337 <image href="GUID-8E2303E9-DB60-5F38-A4D4-8BF8F7A1EF9F_d0e304490_href.jpg" placement="inline"/> |
338 </fig> </li> |
338 </fig> </li> |
339 </ul> </li> |
339 </ul> </li> |
340 </ol> <p><b>Camera |
340 </ol> <p><b>Camera |
341 calibration </b> </p> <p>In order to produce good panorama images, the internal |
341 calibration </b> </p> <p>In order to produce good panorama images, the internal |
342 characteristics of the camera is calibrated by the <xref href="GUID-E361A378-76EB-36C9-A949-A5D31D4D1C4C.dita"><apiname>TPanoramaLens()</apiname></xref>. |
342 characteristics of the camera is calibrated by the <xref href="GUID-E361A378-76EB-36C9-A949-A5D31D4D1C4C.dita"><apiname>TPanoramaLens()</apiname></xref>. |