Forum

Author Topic: Weighted Average Texture Blending Mode  (Read 25228 times)

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Weighted Average Texture Blending Mode
« on: July 25, 2012, 02:26:16 PM »
Using average blending mode, often the edges of photos can be apparent in the final texture if there were changes in lighting.

Would it be possible to implement a 'weighted' average blend mode, where the weight is 1 for non masked areas, 0 for masked areas and the 'area' outside the image, and a user defined gradient ,i.e. number of pixels, between the two. The gradient should begin at the edge of the mask/image so that masked areas do not begin to re-appear.

I think this should at least soften the egdes? Or any other algorithm to achieve the same result!

I tried doing this myself by blurring my masks in photoshop, but these are always converted to black/white on import.

Mosaic blend seems to do a better job of blending joins between photos, but because I have such changes in lighting (I didn't take the images!) average mode is better at creating a uniform 'light distribution'.

Currently using 0.90 pre-release 1534 pro 64 bit.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Weighted Average Texture Blending Mode
« Reply #1 on: July 25, 2012, 02:39:42 PM »
Hello James,

And what is wrong with Mosaic blending? Heave you already tried Orthophoto mapping mode with Mosaic blending?

Best regards,
Alexey Pasumansky,
Agisoft LLC

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Weighted Average Texture Blending Mode
« Reply #2 on: July 25, 2012, 03:33:53 PM »
Mosaic mode creates a lovely image and the 'joins' are invisible, it's quite amazing.

Unfortunately in this case the 'photographer' used the flash for every image so each photo has a big bright spot in the middle, which in mosaic mode becomes quite obvious. Average mode at least reduces this by blending it with 'less flashed' areas.

So I guess my request is quite specific in that sense, and probably I should just make more effort to get better photographs to work with!

In this case (and most cases) I am working 6000 miles from the object in question and have to send other people to get the photos... hopefully i will get to travel out there myself soon!

James

  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Weighted Average Texture Blending Mode
« Reply #3 on: July 25, 2012, 03:35:28 PM »
Actually I might try just masking out the flash area... too simple... doh

Edit: It didn't help greatly, I think the mottled effect is more down to general changes in the lighting, rather than the flash alone.
« Last Edit: July 25, 2012, 03:53:45 PM by James »

bassistas

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Weighted Average Texture Blending Mode
« Reply #4 on: November 02, 2023, 03:31:36 AM »
Actually I might try just masking out the flash area... too simple... doh

Edit: It didn't help greatly, I think the mottled effect is more down to general changes in the lighting, rather than the flash alone.

Have you managed to find a solution to this issue? I'm using the latest 2.1 pre-release now and I still get these lines when I use the average texture mode. If I select mosaic it comes out almost perfect but as I took the photos by free hand in different distances and angles I get some blurry areas with this mode as expected. Only average gives me a smooth texture but I can't get rid of these lines. I tried to mask areas, and readjust photos exposure in Lightroom but its a lot of trial and error until I see some improvement and it's still not good enough.
« Last Edit: November 02, 2023, 03:33:55 AM by bassistas »