Forum

Author Topic: Defocus masks  (Read 2268 times)

Andreas1206

  • Newbie
  • *
  • Posts: 25
    • View Profile
Defocus masks
« on: May 26, 2021, 08:21:59 PM »
Hello!

I've noticed in different projects, that the generation of defocus masks (from V 1.7) gives very unpredictable results. Since I do close-range photogrammetry I would like to use this option to limit the reconstruction and the texture calculation to in-focus areas of the photographs. So I build an initial scaled mesh with only the necessary masks to allow for correct image alignment. I then calculate the defocus masks from the scaled mesh and do the whole photogrammetry process again with the defocus masked images. With this approach in many images perfectly in-focus areas of the object are masked out while completely blurry parts of the photograph are kept.

Does anybody have similar experiences?

@Alexey: What could be the reason for this?   

best regards,
Andreas

jnb

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: Defocus masks
« Reply #1 on: May 30, 2021, 06:40:13 PM »
Hello,

I have exactly he same issue. It seems to me to be a bit better in the latest build, but it could also came from the project I am working on.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13995
    • View Profile
Re: Defocus masks
« Reply #2 on: May 31, 2021, 12:36:30 PM »
Hello,

If anyone can provide the problematic project and related image set, it would help us to study the issue and apply the fixes.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Andreas1206

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Defocus masks
« Reply #3 on: June 09, 2021, 03:31:57 PM »
Hello Alexey,

thank you for your reply - could you supply an ftp access to the Agisoft server, then I could upload my latest project where I have this problem.

thank you,
Andreas

hairyfreak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Defocus masks
« Reply #4 on: July 10, 2021, 01:32:01 PM »
Hi,  yes I've had something similar.
I've found objects that don't have very distinctive surface details get masked out completely while some of the supporting turntable furniture (scales etc) will get selected even though they are way out of focus.

If I'm using a fixed focal distance, is there a way I could manually tell metashape the focused area in focus in one image it can then apply to all the other images?
Would starting with a model-based mask help with this perhaps?

hairyfreak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Defocus masks
« Reply #5 on: July 13, 2021, 09:56:35 AM »
Actually, ignore this, I was misunderstanding the result. I think it works as expected when one knows what to expect!  Good tool, thanks!

hairyfreak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Defocus masks
« Reply #6 on: July 29, 2021, 07:00:47 PM »
Nope, I take it back, there is something strange.

Every so often, and more often than I'd like the mask is the exact opposite of what it should be.

I think my camera positions are good?  The geometry is nice and clean and all other things (placing markers etc) appear to work as expected.  But not the generate masks.

Is this just a mistake in my camera alignment?