Spaces:
Runtime error
Runtime error
File size: 6,495 Bytes
4a33762 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
{
"ticketNumber" : "1015553",
"reporterName" : "Mladen Knezic",
"rankPoints" : "180",
"resolutionStatus" : "",
"ticketName" : "TDA2P-ACD: Custom calibration tool for 2D SRV",
"rankName" : "Prodigy",
"replies" : "",
"views" : "",
"queryText" : "Part Number: TDA2P-ACD Other Parts Discussed in Thread: TDA2 Hi all, I am trying to make a custom calibration tool for 2D surround view in Python with OpenCV that would match the existing one developed in Matlab. So far, I managed to implement the same workflow and to obtain the parameters of initial perspective metrices for 4 cameras with stitched bird view as shown in the image below. As can be seen, the bird view image is decent. However, when I provide the obtained perspective matrices (scaled to match Q11.20 format that I believe is used in GeometricAlignment and Sythesis algorithms), I get the result which is not even comparable to the one shown above, i.e., everything is distorted. This indicates that matrix parameters are wrong or incorrectly interpreted. To confirm that the perspective matrix coefficients are correct I used the same values in another framework (Octave) and I get nice bird view for each camera (I provide a view for front camera below). The question is what I am doing wrong and why I do not get (at least to some extent) correct bird view on the target? Best regards, Mladen",
"imageList" : [ "Data/input/1015553/jpg", "Data/input/1015553/bmp" ],
"partNumber" : "NA",
"allResponseList" : [ {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "Just an additional note. I also tried to use perspective matrix generated by the tool for provided sample images in both Python and Octave. All I got is also distorted indicating that the TI tool does not provide the matrix coefficients expected by OpenCV warpPerspective() and Octave imperspectivewarp().",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Do-Kyoung Kwon",
"rankPoints" : "2860",
"rankName" : "TI__Intellectual",
"date" : "",
"userId" : "/members/758416",
"content" : "Did you compare bin files from your python with the bin files from TI tool?",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "Hi Do-Kyoung Kwon, I am not sure what bin files are you referring to. Currently, I am trying to get initial perspective matrices that would be comparable with the one obtained from TI tool. So far I found out that OpenCV and Octave functions returns forward mapped homographies, however, the SV algorithm is based on back-mapping. Therefore, I tried to use inverse matrices, but it seems that it does not work either. Now I suspect it has something with translating the image center to 0 instead of (width/2, height/2).",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Do-Kyoung Kwon",
"rankPoints" : "2860",
"rankName" : "TI__Intellectual",
"date" : "",
"userId" : "/members/758416",
"content" : "Oh.. I now realized that you are working on SRV on TDA2. I thought you are working on SRV on TDA4.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "Right. It is 2D surround view running on C66.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Do-Kyoung Kwon",
"rankPoints" : "2860",
"rankName" : "TI__Intellectual",
"date" : "",
"userId" : "/members/758416",
"content" : "I think image center could be a reason. There might be no issue with perspective matrices give that you got the right reconstruction for the upper part of SRV. But it seems hard to say without debugging.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "Actually, I got the right reconstruction on all 4 views as you can see in the first image (this is an output from Python tool). The issue arises when I provide the obtained matrices to the usecase (GeometricAlignment link) or to the Surroundview.exe tool for further perspective matrices tuning. It seems that those initial matrices are not in the form expected by the current implementation. I will also check for the image centers, but anyway, thank you for your time.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Do-Kyoung Kwon",
"rankPoints" : "2860",
"rankName" : "TI__Intellectual",
"date" : "",
"userId" : "/members/758416",
"content" : "Great to hear that you resolve the issue.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "No, the issue is still unresolved. I am chasing the way to adjust the perspective matrices to match the required format.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Mladen Knezic",
"rankPoints" : "180",
"rankName" : "Prodigy",
"date" : "",
"userId" : "/members/6015685",
"content" : "I figured this out. Image centers are just one side of the coin. Input images relative to output view orientation should be considered as well. Obviously, a rule for feature points (corners selected in reference image and input images) correspondence I used in my custom tool is different from the one in the TI tool, so I had to add some rotations to the input images (and output results) to match them. It is very specific to my case, but it would be informative if you could share somewhere in the documentation how the corners selected in the tool on reference image corresponds to the corners selected on the input images for each camera view.",
"imageList" : null
}, {
"contentId" : "",
"userName" : "Do-Kyoung Kwon",
"rankPoints" : "2860",
"rankName" : "TI__Intellectual",
"date" : "",
"userId" : "/members/758416",
"content" : "Great! Thanks for the suggestion, too!",
"imageList" : null
} ],
"tags" : [ ],
"fourmType" : "processors-forum"
} |