Forum

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 - PhotogrammetryUser

Pages: [1]
1
Python and Java API / Re: Export number projection of markers
« on: August 22, 2019, 05:24:55 PM »
Yes indeed I was wrong in what I wanted to do: I can only have one residue in m per point for a whole chunk but several residues px of a point. What joins what you say to me indeed! So I finished what I was trying to do :) Thanks Alexey for your help an your experience !

2
Python and Java API / Re: Export number projection of markers
« on: August 22, 2019, 02:43:37 PM »
Yes no problem !
For example, with this code, I can get the "error px" for each marker in each image.

Code: [Select]
for camera in marker.projections.keys():
                   
                    if not camera.transform:
                        continue
                   

                    proj = marker.projections[camera].coord
                    print("proj :",proj)
                   
                    reproj = camera.project(marker.position)
                    error = (proj - reproj).norm()
                    total = (total[0] + error**2, total[1] + 1)
                    value_err_px = math.sqrt(total[0] / total [1])


And I'm looking for to get the error but in (m). In the GUI of Photoscan, it's where you have the list of markers, you have differents columns (Markers, X(m), Y(m), 2(m), Accuracy(m), Error(m), Projections, Error(pix)"

Let me know if you understand me :)

           
                   

3
Python and Java API / Re: Export number projection of markers
« on: August 22, 2019, 01:04:45 PM »
" -->  it is just difference between 3D locations of the measured point location and estimated by Metashape <--"

So I just can get 1 value of error (m)  by target for all chunk, but I can't get 1 value of error (m) by target by image, that's it ? 

4
Python and Java API / Re: Export number projection of markers
« on: August 22, 2019, 11:42:41 AM »
You can find here my part of code :
Some informations :

tab_test is a table in which I stocked some markers that I want to get their errors in meters in each camera.


Code: [Select]
for marker in chunk.markers:
                print(marker.label)
               
                if marker.label in tab_test:
                    for camera in marker.projections.keys():
                       
                        print(camera)
                   
                        if not camera.transform:
                            continue

                        total = (0, 0)
                        est = chunk.transform.matrix.mulp(marker.position)
                        ref = marker.reference.location
                        print("EST :",est)
                        print("REF :",ref)
                        error = (est - ref).norm()  # The .norm() method gives the total error. Removing it gives X/Y/Z error
                        print("ERROR :",error)
                        total = (total[0] + error**2, total[1] + 1)
                        print("TOTAL :",total)
                        value_err_m = math.sqrt(total[0] / total [1])
                        print("VALEUR ERREUR METRE :",value_err_m)
                else:
                    pass

With this code, for each marker, I get the same erreur meter in each camera

Thanks

5
Python and Java API / Re: Export number projection of markers
« on: August 22, 2019, 10:55:58 AM »
Hey Alexey! Great that's what I was looking for ! Thanks a lot ! And I have a last question, I search in the forum but I don't find my response in meter : I want to export the "error (m)" of each of my marker in each images, is it possible? I found the script for the "error pixel" only!

Thanks for your help !

6
Python and Java API / Export number projection of markers
« on: August 21, 2019, 05:16:30 PM »
Hello the community, I'm discovering the API of Photoscan and I'm searching, how can I get the number of projections for each marker in my chunks? (is it possible ?) Thanks for your help  :D

Pages: [1]