Forum

Author Topic: Scanning flowers  (Read 2115 times)

omnivorist

  • Newbie
  • *
  • Posts: 4
    • View Profile
Scanning flowers
« on: July 26, 2021, 01:53:47 AM »
I have been using Agisoft metashape for some time - mainly for architectural surveys. More recently I have been trying to create models of flowers (sunflowers in particular). I appreciate that this may be a difficult  subject but I am not expecting perfection. All the same, some of my early efforts have proved disappointing.
I have taken around 60 photos of a single flower taken on a turntable, under neutral lighting conditions and have masked each photo individually. I can get the photos to align with correct camera positions but when I attempt to build a dense cloud and a mesh derived from it, the results are very sparse and fragmentary. Things are better if a build the dense cloud with quality set to lowest but still not as good as I would expect from the original photos.
I would be really grateful for any advice on how to improve the outcome. I have attached one of my original photos and also a a picture of the resulting textured mesh.
Do you think I should be able to do better than this?
 

Bzuco

  • Full Member
  • ***
  • Posts: 180
    • View Profile
Re: Scanning flowers
« Reply #1 on: July 26, 2021, 09:59:10 AM »
Just my small advice...make pure white background behind flower for future projects to eliminate needs of making masks...it will speed up workflow.
If your example photo is cropped 1:1, then try to make bigger photos of the flower or take photos only from yellow flower part, because those yellow leaves have not so much details(it is just yellowish colors with few grooves) and takes only ~540x540pix on photo...that is not enough for more precise mesh/dense cloud.
Also check how many valid/invalid matches do you have between photos and post screenshot of your project info(RMS reprojection error, max repro. error, ...settings...)

omnivorist

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Scanning flowers
« Reply #2 on: July 26, 2021, 11:50:02 AM »
Thanks Bzuco for your suggestions.
It is true that the flower petals in my photos are limited in their feature content.
However, the example I sent was at reduced resolution (due to limits on the size of attachments). The area of the flower itself in the original was more like 2048x 2048.
In the meantime, I will look to gather a few more stats from Metashape.

I have a broader question however:
Is Metashape capable of constructing a model of a solid that has a very large number of discontinuities?
I am not familiar with the underlying mesh-construction algorithms but I could imagine that they assume there are smooth transitions between points that are in close proximity.
I wonder if the interpolation option has any bearing on this.



Bzuco

  • Full Member
  • ***
  • Posts: 180
    • View Profile
Re: Scanning flowers
« Reply #3 on: July 26, 2021, 12:31:26 PM »
So then 2048x2048 should be enought  :)
Interpolation option in build mesh dialog should have effect only if your resulting mesh vertexes will be denser than points from dens point cloud...or simple said what to do with mesh vertex or its position if there are no close dense cloud points.

In terms of continuity and discontinuity I think metashape has some internal parameter which will make decision when to create separate mesh and when keep it in one continuous piece...dependes of distances between points and also distances betwenn two or more groups of points.

Post closeup screenshot of dense cloud / mesh wire, how it looks like...if it is clean, or if it has some noise in points. If it is OK, then problem is with building mesh algorithm.

I am using metashape only for building dens cloud. For other task(subsampling points, mesh building, noise cleaning,texturing...) I am using cloud compare/meshlab, which has more options set values/parameters. E.g. in cloud compare you have 3 algorithms when building mesh and option to set distance between vertexes in mm, cm, m, ... which is more informative than low/med./high density of mesh in metashape. I am not telling that building mesh in metashape is not good, I just split my workflow on more softwares...each is more suitable for some task.  8)

omnivorist

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Scanning flowers
« Reply #4 on: July 26, 2021, 01:58:06 PM »
Hi Bzuco,

I don't know whether this is what you asked me to post.
To me the mesh looks well-formed but, as you can see, all the petals have 'melted' together.
By the way, the dense cloud was built with the lowest quality setting.
Higher value settings (like medium or high) led to a dense cloud in which many points were missing altogether.

Thanks for your help by the way.
I will try to take a look at the other tools you mention.


Bzuco

  • Full Member
  • ***
  • Posts: 180
    • View Profile
Re: Scanning flowers
« Reply #5 on: July 26, 2021, 04:35:38 PM »
Hmm, now I understand better what you meant by "melted".
If your dense cloud was lowest quality, then it is impossible to have separated petals in dense cloud and absolutely not in mesh.
You will need dense cloud with points every 1mm...or better every 0.5mm and take another sets of 60 photos 45° from below and 60 photos 45° from above. Only then building mesh algorithm will start to work.
I am assuming, that your dense cloud has density ~ 1point every 2-2.5mm. Lowest settings takes only 1/16 of photo pixels so if your flower was 2048x2048 then lowest means 128x128.

You need to first figure out, why higher quality dense cloud is missing many points. Try to disable depth filtering in build dense cloud dialog...cloud will be probably very noisy.
Check matches(attachment) between photos. More valid matches between photos mean better connections between photos => more precise camera positions, better depth maps, cleaner dense cloud results.
If it did not help, you need to go back to alignment settings. Start with disabling generic preselection...then alignment will start to find matches on every photo with each other, so it will find maximum connected points possible. Be sure to use Highest accuracy, because your mask on every photo take out a lot of space from photo so only flower area matters during process. Then you will start to try change key point limit from lets say 5000 to 100000. Apply mask to should be also set correctly...ensure that matches after alignment process are from flower area and not from background area.

Let me know if it helped you  ;)  :D

omnivorist

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Scanning flowers
« Reply #6 on: July 26, 2021, 09:50:15 PM »
Wow - there are a lot of good ideas here.
Can't wait to try some of them out.
I can see how it important it is to understand exactly what some of these settings mean.
Thanks for your continued help and I'll let you know how I get on.

Incidentally, what kind of subject matter do you use Metashape to model?



Bzuco

  • Full Member
  • ***
  • Posts: 180
    • View Profile
Re: Scanning flowers
« Reply #7 on: July 26, 2021, 11:43:24 PM »
I mostly use metashape for garden projects and point cloud data itself are enough for my purposes(taking heights, distances and camera positions for rendering). Sometimes for greater comfort I am creating also mesh in cloud compare, unwrapped in Rizom UV and textured in meshlab using baking point colors to texture(projecting original photos would be better, but it needs additional procedure and time  :-\ ).