I want to detect stars on fits astronomical image. For detection I need to use OpenCV library. But have problems with data formats and converting. How can I open FITS file (data format float32) for working with OpenCV, which works in format uint8? How to convert float32 to uint8?