qianqianwang68 / caps

MIT License
183 stars 25 forks source link

Can you explain the operation in the function rotateImage? #14

Open DRjy opened 1 year ago

DRjy commented 1 year ago

https://github.com/qianqianwang68/caps/blob/3ed2670caeef2410ecafec27713195a27ce304c4/dataloader/data_utils.py#L17 https://github.com/qianqianwang68/caps/blob/3ed2670caeef2410ecafec27713195a27ce304c4/dataloader/data_utils.py#L18 https://github.com/qianqianwang68/caps/blob/3ed2670caeef2410ecafec27713195a27ce304c4/dataloader/data_utils.py#L19

Hi, thanks your great work. I have a trobule in understanding the operation of rotation. I dont derive the new_height and new_width, and do not understand why the maximum of max(scale_h, scale_w) as the final scale? Can you give me a detailed explanation?

Thank you @qianqianwang68 in advance!