microcontrollersandmore / opencv_3_knn_character_recognition_python Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://www.youtube.com/watch?v=c96w1JS28AY
Home Page: https://www.youtube.com/watch?v=c96w1JS28AY
Hi,
When I tried to execute a train and test python file, I am getting the below error,
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.3.1\plugins\python-ce\helpers\pydev\pydevd.py", line 1434, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition with Anaconda plugin 2019.3.1\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Admin/Documents/Projects/Handwritten text extraction/predict.py", line 169, in
main()
File "C:/Users/Admin/Documents/Projects/Handwritten text extraction/predict.py", line 150, in main
retval, npaResults, neigh_resp, dists = kNearest.findNearest(npaROIResized, k=5)
cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\ml\src\knearest.cpp:312: error: (-215:Assertion failed) test_samples.type() == 5 && test_samples.cols == samples.cols in function 'cv::ml::BruteForceImpl::findNearest'
Please help me with this...
Hi,
I am facing the issue in creating the Text file.
Classification and Flattened images files are created but no data was append in that file.
Chris, which license does your code fall under?
Where i can find Wide Range data set like all the character available in ms office
How to add whitespaces?
from where the value of flattened image? is that array of pixel or what?
everytime i push shift button it goes to another letter..any help?
after running file GenData.py
, it opens 4 windows and Instructions aren't clearly given to train characters?
when I ran GenData.py
,
it successfully created two files classifications.text
and flattened_images.txt
, but after running TrainAndTest.py
, it showed output only as RRRR... for all 3 test cases images?
It is because it only trained on Character-R,
Please give steps in WrittenFormat in Readme.md
, as your instructions on Youtube.
HI,
For single-character, the Opencv find two contours and draw two rectangles.
I need to combine that contours into a single contour based on coordinates.
Please kindly help..
I am having an issue that when reading a 9 that follows a zero a zero is returned. I can't get around it. 9 that follows other digits is read ok.
I want to change the classification and flattened image file cause I want to train the algorithm on recognizing the Arabic character, I am using an image contains the Arabic number and characters but I input the character as an English one so there is no error in input
but when using the training file it only prints numbers with no letters can you help me, please
I am getting this error. anyone, please help.
C:\Python27\python.exe "C:/Users/Entrepreneur/Documents/Python Scripts/numberplate/Main.py"
Traceback (most recent call last):
File "C:/Users/Entrepreneur/Documents/Python Scripts/numberplate/Main.py", line 134, in
main()
File "C:/Users/Entrepreneur/Documents/Python Scripts/numberplate/Main.py", line 38, in main
listOfPossiblePlates = DetectPlates.detectPlatesInScene(imgOriginalScene) # detect plates
File "C:\Users\Entrepreneur\Documents\Python Scripts\numberplate\DetectPlates.py", line 43, in detectPlatesInScene
listOfPossibleCharsInScene = findPossibleCharsInScene(imgThreshScene)
File "C:\Users\Entrepreneur\Documents\Python Scripts\numberplate\DetectPlates.py", line 133, in findPossibleCharsInScene
imgContours, contours, npaHierarchy = cv2.findContours(imgThreshCopy, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE) # find all contours
ValueError: need more than 2 values to unpack
Process finished with exit code 1
Hi guys
I run the Gendata.py for persian alphabets. after training both of the classifications and flattened_images are empty.
intValidChars = [ord('ู')]
Hi,
After the execution of GenData.py, classifications.txt and flattened_images.txt are getting created, but these files are empty.
Gendata.py is not working
please any help I'm getting this error
C:\Users\user\PycharmProjects\project1\venv\Scripts\python.exe C:/Users/user/PycharmProjects/project1/gendata.py
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/project1/gendata.py", line 102, in
main()
File "C:/Users/user/PycharmProjects/project1/gendata.py", line 41, in main
cv2.CHAIN_APPROX_SIMPLE) # compress horizontal, vertical, and diagonal segments and leave only their end points
ValueError: not enough values to unpack (expected 3, got 2)
Process finished with exit code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.