mlampros / OpenImageR

Image processing Toolkit in R
https://mlampros.github.io/OpenImageR/
57 stars 10 forks source link

Augmentation issue #3

Closed yibochen closed 7 years ago

yibochen commented 7 years ago

great project and so cuty the kitty i have little problem when use the Augmentation function

  1. if i only want to do zcaWhiten but not crop or resize,i will get this error msg: zca_comps should be greater or equal to 1 and less than or equal to 0 i think this is because the initial value of flag_comps is set to be zero,maybe it should be nrow(image)?
  2. when i set crop_width=1:nrow(image),i get this error msg: the length of the crop_width sequence should be less than or equal to the initial width of the image so maybe "if nrow(image) <= length(crop_width)" should be "if nrow(image) < length(crop_width)", or the msg should be more precise?
mlampros commented 7 years ago

I'm sorry for the late reply, you are right about the 1st issue of the Augmentation function. I corrected it and now it should work error free. Your 2nd point, is not exactly an issue, but as you said, I should have been more precise in case of an error. Both 'crop_width' and 'crop_height' should be less than or equal to nrow(image) - 1 and ncol(image) - 1. I subtract 1 from both dimensions in R to avoid issues due to the difference in indexing between R and RcppArmadillo. Download the github version of the OpenImageR package (i have to submit the newer version on CRAN and it takes some days). Please test the Augmentation function and let me know.

yibochen commented 7 years ago

yes, it works well now. thank you again,for the great work