Easonyesheng / CCS

[RA-L&IROS22] A learning-based camera calibration system.
MIT License
31 stars 2 forks source link

Dataset generation #3

Closed alien19 closed 1 year ago

alien19 commented 1 year ago

Hello, I wanted to generate a dataset with another resolution and hence, another parameters but when I changed the values in the data_generateor.py it gives the following error image

any help is appreciated!

Easonyesheng commented 1 year ago

Sorry, I cannot see your image. You may need to upload your image again.

alien19 commented 1 year ago

@Easonyesheng please recheck

Easonyesheng commented 1 year ago

It seems like that the draw_fix_checkboard function returns None. Maybe your parameters make the chessboard appear outside the image. Please check the line 474 of DataGenerator.py.

alien19 commented 1 year ago

Yes I'm aware of that, the random numbers of the parameters generated according to my range doesn't abide by the condition https://github.com/Easonyesheng/CCS/blob/e2ed5d23d84d16817b1433258fd7c3370e3deaca/dataset/DataGenerator.py#L262 so I wanted to understand more about it!

Edit: I'm interested in generating images with size 2800 which is relatively larger than mentioned in the demo i.e 480

Easonyesheng commented 1 year ago

p_ ic is a point in the image coordinate system. L262 is used to determine if the point inside the image.

If you want to generate image with larger size, you should calculate the parameters like specific camera focal length and the distance between camera and chessboard, etc to keep the chessboard inside the image.

alien19 commented 1 year ago

thanks @Easonyesheng I already got what u have already explained, but what I didn't understand is the fixed value of the d in draw_fix_checkboard. I really tried multiple combinations of parameters and image size but with still stuck with the error

Easonyesheng commented 1 year ago

The d is the distance between chessboard and camera center, which is depicted in the image. The d should be changed if you want a larger image, and it is the ratio of d that matters (ratio between the standard and random placed chessboard distance). I think you should pre-calculate the parameter range first, based on the camera projection model and the description.