Closed tiffanylin43 closed 5 years ago
@kkl18 This part is subject to change depending on what format the data would be saved in MangoDB. I can either do images represented as array or raw image like ".jpg" or ".tif". The images can be read in as array through fundtions like "imread" in skimage if it's raw image file like ".jpg" or ".tif". If the data saved in Mango is already array, the codes I've uploaded can work directly with the array.
@tiffanylin43 OK. The Mongo database is saving everything as raw bytes of a .tiff file since Mongo doesn't like the numpy array format. I've included a function that both converts the data and reads it with imread called bytes_to_plot(bytes, extension).
@kkl18 Great. So am I supposed to assume that all the input coming into the image processing functions are .tiff images? I think I can use the imread in "skimage" package to convert the images into numpy arraies that can be processed with other functions in "skimage" for following steps. This can make sure the image processing functions I used from skimage can work as expected. I'll edit this part soon.
Finished codes and related tests for get_size().
How is the numpy array formed for the image processing algorithms? Are you using matplotlib's imread function?