Forum

Author Topic: Is there a way to put mask from sparse point cloud to image?  (Read 5706 times)

Phogi

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Is there a way to put mask from sparse point cloud to image?
« on: October 06, 2020, 02:24:53 AM »
Hi Alexey,

Is there a way to draw mask for selected area from sparse point cloud / ortho to the photos, rather than draw mask each image with same mask? What I want to do is creating point cloud with very high desnity in some AOI, is that possible? Or is it possible to create point cloud with high density in some part and lower in not interested part to speed up?

Thank you!

j.senn

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is there a way to put mask from sparse point cloud to image?
« Reply #1 on: October 13, 2020, 10:47:03 AM »
Hi Phogi,
I would be really interested in a global mask function, too. Please let us know if you figure out how to do it.

Concerning your AOI: You could create a copy of your chunk and remove all cameras that do not cover your AOI. Should make the processing faster.

JMR

  • Hero Member
  • *****
  • Posts: 526
    • View Profile
Re: Is there a way to put mask from sparse point cloud to image?
« Reply #2 on: October 13, 2020, 07:41:05 PM »
Yes.
1. Build a rough mesh on the sparse cloud using highest triangle count or even better, a custom quality number with 2x the number of tie points. (consider using height field mode if your project allows it)
2. Select your area of interest on the triangle mesh and use crop button to keep only the selected triangles.
3. File import masks from model. (to all photos, to a selection of photos or to the entire workspace)

As long as triangles on tie points are going to be large and uneven, your selection and therefore your mask, will have borders like a saw. If you want them to have cleaner boundaries you can build a low quality dense cloud, then use a polygon to select dense points inside, then crop. Next is to build a mesh based on the remaining dense points (extrapolation disabled) and again use mask import form model.

I hope this workflow works for you.
Best regards

José Martínez
GEOBIT CONSULTING SL CTO.
ACCUPIXEL LTD. co-founder.


Phogi

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Is there a way to put mask from sparse point cloud to image?
« Reply #3 on: October 20, 2020, 01:03:20 PM »
Hi Jose,

Thank you very much for your kind suggestion. I've had a try the workflow and it does creating a mask on the image! However it will then crop the whole point cloud to the selected area only. What I want to achieve is selected part can use high density of point reconstruction, while the rest part are still proceeding with for example medium density, so that for not interested area it is still processing but less resources are required.

Would that be possible in Metashape?

Best,

JMR

  • Hero Member
  • *****
  • Posts: 526
    • View Profile
Re: Is there a way to put mask from sparse point cloud to image?
« Reply #4 on: October 21, 2020, 01:13:22 PM »
Hello, Phoggi:
It is not possible to build a cloud with two different qualities in one step.
What you can do is build first the low quality dense cloud for the whole and then build a mask to isolate the part that you want to process with high quality. You can have the two dense clouds separated in the same  chunk, or in the case that you want to have both clouds merged, you can do as follows:
1. create low quality dense cloud and after all, duplicate chunk (including dense cloud)
2. in the copy draw a polygon around area of interest and use select points by shape, crop and create a mesh from remaining points.
3. import mask from model
4. build HQ dense of selected area.
5. group all photos in copy chunk (in case you want to remove duplicated photos in next step)
5. merge chunks with dense clouds (and then remove the grouped photos from the merged chunk)

Regards
José Martínez
GEOBIT CONSULTING SL CTO.
ACCUPIXEL LTD. co-founder.

Phogi

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Is there a way to put mask from sparse point cloud to image?
« Reply #5 on: October 22, 2020, 01:40:22 AM »
Hi Jose,

Thanks for your kind suggestions, though I was trying to speed up with higher density point cloud reconstruction time, but your suggestions offered a good new path on how to merge the data.

I did try the mask from mesh and it is interestingly taking longer in processing. Directly running high density I'd get 63mins in all dense reconstruction time, while with the mask for AOI, the time is 72 mins, I think this is due to the cropping procedure and the whole surface was still created.

So to speed up the solution currently is still to have more powerful machine then I guess.

Thanks a lot!
Best