lood339 / SCCvSD

Sports Camera Calibration via Synthesic Data
BSD 2-Clause "Simplified" License
71 stars 19 forks source link

The template pitch #11

Closed AhmedKhaled945 closed 4 years ago

AhmedKhaled945 commented 4 years ago

@lood339 Hello Dr.Chen, I used HoG features because Deep features is not working for some reason, giving bad results on test set, so after i used HoG, i got my refined homography, now i want to visualize the results, i can multiply the homography by the input image but i don't have the template img (can't find it in the repo). Would appreciate the help! Thanks in advance. Example of what i need: image

lood339 commented 4 years ago

Hi, Drawing these examples is not supported at the moment. But, here is something you can try first.

  1. The template data is here: https://github.com/lood339/SCCvSD/blob/master/data/worldcup2014.mat A brief document is here: https://github.com/lood339/SCCvSD/blob/master/data/read_me.py The template is a group of line segments in the unit of meters.
    1. how to draw the figure given the template and the camera pose (homography)? I drew these figures this in Matlab. If I remember correctly, there are two steps. First, warp the image to the world coordinate by H^{-1}. Second, overlay the template line segments on the warped image.
      You may have your own try first. At the same time, I may add some code to draw these pictures. Thanks.
AhmedKhaled945 commented 4 years ago

I just need to get the full picture, first we have a database of cameras:features pairs, the cameras here get me the Homography, which is the matrix relating the real world coordinates to the hawk eye or the mini map coordinates. x' = Hx Where x' is the minimap or the template coordinates, and x is the real world coordinates (frame coordinates) So here, i suppose you meant by ( warp the image ) to warp the template? because my frame image is already in world coordinates,

Also, i have some matlab knowledge, if the matlab project is opensource or this piece of code, it would be really great if you shared it with me,

Thanks in advance.

lood339 commented 4 years ago

Hi, Here is the matlab file: https://github.com/lood339/CalibMe/blob/master/matlab/image_to_model_warp.m This is the unit test file: https://github.com/lood339/CalibMe/blob/master/matlab/ut_image_to_model_warp.m Sorry, the code is for another project and is not cleaned. You may have to clean/test by yourself.

AhmedKhaled945 commented 4 years ago

Of course, thanks so much Dr Chen, Appreciate it.