Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - masayuki

Pages: [1]
Python and Java API / Re: Save Images with Markers
« on: November 14, 2021, 06:04:32 PM »
Thanks for your reply.
I found the following page and gave it a try.

The marker position(x[pix], y[pix]) on the image could be obtained in the following way.

Code: [Select]
for marker in chunk.markers:
    for cam, proj in marker.projections.items():
        target_pos = (proj.coord.x), proj.coord.y)

I'm more familiar with OpenCV, I used "cv2.drawMarker" to draw the markers.
This Q&A has been resolved.

Python and Java API / Save Images with Markers
« on: November 12, 2021, 03:55:09 PM »
Before taking multiple images and camera alignment (will take much time),
I would like to simply check whether or not markers can be detected in a single image.

I run my python script in headless mode.
My script has the following procedure.

1. Read a single image that contain coded target markers.
2. Detect the markers.
   (coded-target can be detected even before camera alignment)
3. Save the image in which the markers are drawn.

I have completed step 2, but I don't know how to get the image data with the marker (flag) drawn on it.
Is it possible to obtain a 2D image with markers as displayed in Metashape's GUI?

Pages: [1]