mirror of
https://github.com/opencv/opencv.git
synced 2025-06-13 04:52:53 +08:00
remove unnecessary imports in knn tutorials
This commit is contained in:
parent
94c7d99d0d
commit
1b294c013a
@ -21,7 +21,6 @@ train_data, and next 250 samples as test_data. So let's prepare them first.
|
|||||||
@code{.py}
|
@code{.py}
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import cv2 as cv
|
import cv2 as cv
|
||||||
from matplotlib import pyplot as plt
|
|
||||||
|
|
||||||
img = cv.imread('digits.png')
|
img = cv.imread('digits.png')
|
||||||
gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
|
gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
|
||||||
@ -89,7 +88,6 @@ alphabets directly.
|
|||||||
@code{.py}
|
@code{.py}
|
||||||
import cv2 as cv
|
import cv2 as cv
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
|
|
||||||
# Load the data, converters convert the letter to a number
|
# Load the data, converters convert the letter to a number
|
||||||
data= np.loadtxt('letter-recognition.data', dtype= 'float32', delimiter = ',',
|
data= np.loadtxt('letter-recognition.data', dtype= 'float32', delimiter = ',',
|
||||||
|
Loading…
Reference in New Issue
Block a user