I'm so confused about how to compile a code combine from open cv and scikit-image. In my program, I use open cv for pre-processing and segmentation steps, but I want to use GLCM for feature extraction which is available to use scikit-image code, and for classification I want to use open cv for SVM method. Please guide me to build this code.
Asked
Active
Viewed 363 times
1 Answers
2
The images in both opencv and scikit are just numpy arrays. So you can go ahead and use both of them. But there might be one small problem because opencv by default uses BGR format while scikit uses RGB format. So make sure to convert as necessary. For example
opencv_img = #some image that has been read using opencv
scikit_img = cv2.cvtColor(opencv_img, cv2.COLOR_BGR2RGB)
# do something in scikit
opencv_img = cv2.cvtColor(scikit_img, cv2.COLOR_RGB2BGR)
# do something in opencv

Mark Setchell
- 191,897
- 31
- 273
- 432

soumith
- 536
- 1
- 3
- 12