Forum

Author Topic: JPG aligned Tiff not  (Read 4052 times)

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
JPG aligned Tiff not
« on: March 02, 2020, 08:18:51 PM »
Hi
I have archaeological object placed on rotating table photographed from different angles. Usually I take photos in raw format (canon 5ds). Usually I do fast checking that everything is ok and align 144 photos, key point 40 000, tie points 9000 all other options off. ALL photos were aligned ok in RAW (I think it's JPG included in RAW). Next I converted raw photos to TIFF and changed white balance. This tiff files didn't align correctly. I tried to convert RAW files to JPG and they aligned correctly even with changed white balance. So I tried to covert RAW files straightforward to TIFF and this TIFF files always can't be aligned. I checked TIFF with LZW compression and without always with the same result - bed align.

I have such problem in 2 projects so far. I need TIFF because I want to have best quality and masks. I did a test with PNG files and they also didn't align. So the result of my short test is that TIFF files are not aligned correctly in Metashape 1.6.1. Maybe because they are to big ?  I am changing only picture format to JPG and align is correct - all photos ! All others parameters are the same.

So conclusion is that JPG files can be aligned TIFF not. I have 64GB of RAM i7 processor and RTX 2070 Super graphic card. I think computer is ready for align 150 photos.

I can align jpg files and next change the path of each file to tiff file but I have to do it one by one It takes a lot of time with 150 photos. I can provide files and project by PM if they are needed.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #1 on: March 02, 2020, 08:50:09 PM »
Hello NORIM,

Do you observe any error messages during the alignment or just no cameras are aligned?

Can you share a small set of images (both in TIFF and JPG formats) to support@agisoft.com that can be used to reproduce the difference?
Best regards,
Alexey Pasumansky,
Agisoft LLC

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: JPG aligned Tiff not
« Reply #2 on: March 02, 2020, 10:33:53 PM »
Ok I will send you PM I didn't get any error message just not aligned photos.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #3 on: March 03, 2020, 08:08:16 PM »
Hello NORIM,

Thank you for sharing the sample data, we will check that.

I was able to align the TIFF set (enabled cameras only) from your project in two steps: initial alignment with common parameters (High accuracy, 40 000 / 10 000 points) and then Align Selected to the not aligned cameras.
However, at the moment I cannot yet say, why the alignment is unstable for TIFFs and the images are not aligned in a single run as expected.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #4 on: March 04, 2020, 01:05:39 PM »
Hello NORIM,

I've tried to add a couple of masks to cover the static background and areas with the most invalid tie points on the photos and then run the alignment using "Apply Masks to Tie Points" and it seem to solve the problem and result in stable alignment for TIFF data.
Best regards,
Alexey Pasumansky,
Agisoft LLC

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: JPG aligned Tiff not
« Reply #5 on: March 04, 2020, 03:24:22 PM »
Thanks! So the problem exist... in my tests PNG works better than TIFF but also not so good as JPGs. I have the same project with added photos (166) and they are aligned without problems in JPGs but not in TIFF and PNG.

Do you have any better solution to change photos after aligment to TIFF or PNG. It's very time consuming to change the path of every photo from 166 photos.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #6 on: March 04, 2020, 03:58:18 PM »
Hello NORIM,

For me it looks like you there are more tie points detected in the static background for TIFF format than for JPEG. That's why I suggest to mask out these static elements on a couple of images and run alignment operation with the same parameters but with "Apply masks to Tie Points" option enabled.  Just open a few images where there are the most white points in the Photo view (related to invalid tie points) and mask the area around the object of interest (for instance, using the rectangular masking tool).
Best regards,
Alexey Pasumansky,
Agisoft LLC

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: JPG aligned Tiff not
« Reply #7 on: March 04, 2020, 04:36:21 PM »
Align selected cameras option doesn't work for me. After align selected cameras nothing happens. Maybe I am doing something wrong. I will do investigation with masks but that's also time consuming. The best option for now will be just to change files from JPGs to Tiffs orn PNGs.

Mak11

  • Sr. Member
  • ****
  • Posts: 374
    • View Profile
Re: JPG aligned Tiff not
« Reply #8 on: March 04, 2020, 04:39:04 PM »
NORIM

Re-run the alignment again without resetting it and the non-aligned cameras should align.

Mak

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #9 on: March 04, 2020, 05:15:07 PM »
Align selected cameras option doesn't work for me. After align selected cameras nothing happens. Maybe I am doing something wrong. I will do investigation with masks but that's also time consuming. The best option for now will be just to change files from JPGs to Tiffs orn PNGs.

In the TIFF project that you have provided:
- switch the Photos pane view to "Detailed",
- sort the cameras according to the Aligned column,
- select all cameras that are not aligned (do not have a checkmark in the column),
- right-click on selection and choose Align Selected Cameras command from the context menu.
Best regards,
Alexey Pasumansky,
Agisoft LLC

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: JPG aligned Tiff not
« Reply #10 on: March 05, 2020, 03:31:01 PM »
Thanks. For now I can confrim taht with masked background photos are aligned correctly.

NORIM

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: JPG aligned Tiff not
« Reply #11 on: March 05, 2020, 04:25:31 PM »
Ok so JPG and CR2 (with embed JPGs) files works usually better than TIFF because they compress background and this points from static background doesn't mess with align. Masking is also a solution but for me it's most important to know my photos will align correctly as fast as possible. I get archaeological finds for few hours and I have to know did I do my photos for photogrametry good or not. Especially when I am doing hundreds of photos and several artifacts.

So that would be very useful to have option to change all files in folder with photos from JPGs to TIFFs not one by one files as now in 1.6.2 Metashape.

Anyway thanks very much for help and now I am now much more convinced that my work will give nice 3d models results :)


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: JPG aligned Tiff not
« Reply #12 on: March 05, 2020, 06:06:14 PM »
Hello NORIM,

If you are using the Professional edition of Metashape, you can use the following script to swap the extensions of the cameras in the selected chunks. After that Change Path command would work for multiple cameras at once.
Best regards,
Alexey Pasumansky,
Agisoft LLC