|
I am working on project of Map vectorization as my senior design project in university.As part of project. I want to extract labels out of map (OCR) one big benfefit i have is that i know color of text so i can seperate text from other image.. Can u please elaborate more how u did OCR???
in my case i dont need to seperate text from image, i will get it through color.. i have studied Artificial Neural Networks course in my univ... Which ANN did u used?? Back propagation?? counter propagation or radial basis? what features u fed as input vector to NN??
I am already doing image vectorization.. till now i am finding closed colour contours, intersection points etc and my final output is vertices and edges ( vectors).. So please tell me in this perspective
can i get copy of ur project to see how it works ( IF possible???)
ANY HELP IN THIS REGARD WILL BE HIIIIIIIIIIIIIIIIIIIIIIIGHHHHHLLLLLLLLYYYYYYY
APPRECIATED... OFFCOURSE I WILL MENTION UR NAME IN MY PROJECT REPORT ..
THANKS IN ADVANCE
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
M.Shoaib Khan wrote:
Can u please elaborate more how u did OCR???
Geez, this deserves an article series, but I'll try
M.Shoaib Khan wrote:
one big benfefit i have is that i know color of text so i can seperate text from other image..
This is great. Don't forget to allow some small variations on the color to get the full char. To separate chars, a simple scan for an empty vertical space is enough. If they are 'glued' together, the algorithm is a bit more complicated, and you'll need to add vertical lines to the char until the network can recognize something.
M.Shoaib Khan wrote:
Which ANN did u used?? Back propagation?? counter propagation or radial basis?
This was the scariest part, I was afraid that I would need a very good NN, but in the end, it was just a simple perceptron, with some hidden layers and had a very good performance (it was both fast and accurate). I noticed that the first steps were much more determinant on the OCR's performance than the NN itself.
For the feature extraction, I don't remember the algorithm name right now. It was not invented by me, and seems to be used by several omnifont OCRs. The algorithms I used both reduced the resolution and the size of the chars (all of them need to be the same, normally). So, I created a grid like this:
...|...|...|... ...|...|...|...
..1|..2|..3|... ...|.xxXxx.|...
...|...|...|... ...X...|.xx|...
---+---+---+--- --x+---+---X---
...|...|...|... ..x....|...X...
..4|..5|..6|... ...XxxxxxxxX...
...|...|...|... ...Xxxx|.xxX...
---+---+---+--- ---XX--+---X---
...|...|...|... ...X...|...X...
..7|..8|..9|... ...XX..|..XX...
...|...|...|... ...|...|...|...
The numbers are IDs of the segments, and you can do this on the horizontal segments too (I just didn't to make the text more clear). Basically, you get the image and draw those imaginary segments. You then mark if (or how many times) those segments have been crossed, so you can detect horizontal, vertical and diagonal line features and each feature is an input node of the NN. Add some hidden layers (this will need tweaking, but I had success with sizes x, x/2, x/4) and the output layer is just a sequential ID for the char (0 for 'A', 1 for 'B'...)
Unfortunately, this code is part of my product now, so I can't give you a copy.
I didn't need to do image vectorization, so I don't have any experience with it.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
hy, i have written an exe and a dll. the exe uses a class in the dll.
in this dll- class i have some CString members. now, when i debug i see the
following: in the constructor, everything is fine, all strings got initialized and have valid adresses. now in a subsequent functioncall, every
CString Member has the adress 0x000000 except the one who was first declared in the class. i have no idea, what the problem could be!
has it something todo with the dll?
please help me!!
thanx
|
|
|
|
|
Sounds like it is an IDE feature, not C++ design.
Kuphryn
|
|
|
|
|
hy, sorry, i do not understand your answer at all, could you please explain?
thanx, greetz
|
|
|
|
|
I am saying the problem is with Visual C++ debugger, not your application.
Kuphryn
|
|
|
|
|
hy, i dont think the problem is the debugger,or how could this be?
what am i doing wrong? im working with visual c++ since 2 years now, and never experienced a similar problem. how can i solve the problem?
|
|
|
|
|
Probably you are doing something like this: (normally more complicated, but the same thing)
CString *p = NULL;
p->Trim();
Calling a method on a NULL pointer may cause the problem you're describing.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
I think that you don't get the point of what he is asking. I think that he wants to know WHY the subsquents aren't initialized. You are only showing the effect of it, but I think he is AAAARGH-ing about the not-being-constructed of the CString-members in his class.
And btw, I have no idea what he could be doing wrong. This is really weird... a member var should be constructed if it shouldn't be a pointer but a physical instance...
|
|
|
|
|
I have been using GetOpenFileName for quite some time in many programs to open files. However, I have not found a way to select what "view" style is used with the Open File Dialog appears such as "Thumbnail", "Filmstrip"...so on.
Is there a way of pulling up the Open File dialog and defaulting that dialog to be one of the views such as "Thumbnail"?
|
|
|
|
|
Hi,
I would like to get the source code for an Editor (in VC++), with Auto-complete feature,and syntax highlighting, just like what we have in Visual Studio. pl. send me the URLs / Project name, if you have come across any thing like that in the net b'for.
Thanks in Advance
Jagadeesh
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
You could try looking at "Crystal Edit" and "Brainchild", for syntax coloring, at codeproject. As for Auto-complete, you may what to search www.sourceforge.net.
INTP
|
|
|
|
|
Just found this "Using Scintilla for syntax coloring in MFC" at codeproject.
The article recomends going to www.scintilla.org for information on regular expressions, auto-complete, etc...
Good Luck!
INTP
|
|
|
|
|
I have created a program in VC++(MFC programming) using ListCtrl and MSFlexGrid control(This both have pasted in separate Views). I want to move the focus from ListCtrl to MSFlexGrid control and vice versa. Will anyone help me how to set the focus from List control to MSFlexGrid control.
Ramanan.
|
|
|
|
|
You need the a handle to both the items in one place and them simply say SetFocus.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
Have you tried the SetFocus() member functions for their respective CWnd-derived control wrappers?
i dont think MsFlexGrid has a CWnd derived wrapper, so you could simply send it a WM_SETFOCUS msg.
HTH
|
|
|
|
|
How can I read the file size and based on the size an action will be triggered?
C++/VC++
Any help will be greatly appreciated
|
|
|
|
|
Getting file length:-
DWORD length;
CFile file;
file.Open ("c:\\myfile.dat", CFile::modeRead | CFile::shareDenyNone );
length = file.GetLength (); // Will give you the file length.
Simple... isn't it ?
Regards,
Jijo.
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Are you looking to execute your code if file size is changed by some other user or application ??
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
When the file gets to certain size I will run another application
|
|
|
|
|
|
Is it possible to grab a certain pixel's color using WM messages?
If so, which WM should I send and what kind of wParam and lParam would I need to send?
Thanks,
~Mike
|
|
|
|
|
you can use GetPixel
COLORREF GetPixel(<br />
HDC hdc,
int nXPos,
int nYPos
);
why do you need SendMessage ?
|
|
|
|
|
Because I need to retrieve pixel colors from an inactive window..
Is it possible?
Thanks
~Mike
|
|
|
|
|
__Cerb wrote:
Is it possible?
not sure...
an inactive window isn't drawn!! .. needs to get the wm_paint to be redrawn..
|
|
|
|