|
Hello Experts,
I have an Image in which have Some text.
I want to write program for find the text from image.
So if you have any suggetion please help.
Thanks
If you can think then I Can.
|
|
|
|
|
Go through the below link this may helps you
Neural Network OCR[^]
Rajesh B --> A Simple Programmer <--
|
|
|
|
|
Are you talking about OCR? or are you talking about extracting text hidden inside image files?
|
|
|
|
|
No sir,
I have an Image in which have some information in visible form. And i want to get it as a String Format.
Thanks for reply
If you can think then I Can.
|
|
|
|
|
Use OCR, MODI or Atalasoft
|
|
|
|
|
i have a array called rArray and it consist of a list of integers.
how do i compare it to find which one is the smallest or the biggest, assigning smallest to a textbox and biggest to a textbox.
for (int y = 0; y < listBox6.Items.Count; y++)
{
if (rArray[y] < r)
{
}
r is an integer.
modified on Tuesday, November 9, 2010 10:33 PM
|
|
|
|
|
This is the umptieth day you are trying to get either the min and max, or the average (not sure which), of a collection of numbers, which is very elementary. Rather than asking basic questions in a random order, I would strongly recommend you buy and study an introductory book on C#; that will teach you the basics of the language, of programming in general, and of Windows programming in particular. In one week's time you could acquire a lot of knowledge, well structured, explained and illustrated, and by doing so raise yourself to a whole different level.
If you don't want to do that, I can only suggest you choose and read some of the excellent articles here on CodeProject (stick to the ones that have a score of at least 4 out of 5), as you are in need of coding examples.
|
|
|
|
|
This[^] article discusses sort (using LINQ) on string arrays - but the concepts for integers is fairly similar.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
LINQ also has functions for Max and Min so it can be as simple as...
int[] nums = new int[]{1, 2, 3};
textBoxMax.Text = nums.Max().ToString();
textBoxMin.Text = nums.Min().ToString();
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
What do you think you should do? This is a fairly basic comparison problem, and you should be able to work it out by just writing out the steps that you would do to perform the same task. Break the problem down into smaller and smaller steps and then you will reach your solution.
|
|
|
|
|
Based on your question I would assume this is some kind of homework assignment so you should definitely use my other post suggestion for LINQ and not explain your method in any shape, way or form.... then your lesson is learned
The reason why this must be a homework assignment is because it is so basic. If you where trying to do this for any other reason (like a career in programming) then you should have more of an interest, which would mean you would have already gone down the route Luc had suggested (which is certainly the way forward) and would not be posting this question ANYWHERE.
The other option is that the potential money for a career in programming is your motivation but unfortunately with great programming career comes great need for ability to think
...maybe I am being too harsh...
int min = nums[0];
int max = nums[0];
foreach(int i in nums){
if(i < min)
min = i;
if(i > max)
max = i;
}
...now the challenge: can you work out how to create nums?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
musefan wrote: ...now the challenge: can you work out how to create nums?
That's easy. You post a follow up question "Urgntz. How to create nums."
|
|
|
|
|
Guys,
I am very naive in Programming, I have a .exe file with me, now i want to build a setup component and install in system, how to update the .exe file in Control panel(Add or Remove compnent). And the same when i want to unistall back from control panel items, what are the thing that i need to do... can some body help me out.. Please..
Thanks in Advance
|
|
|
|
|
Please do NOT ask the same question in more than one place. It doesn't get any better answers, and it annoys people who might have helped you.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Hi,
What would be the fastest way to ping 255 IP addresses?
Are there any example with using multithreading, as I am quite new to threading.
|
|
|
|
|
The multi-threading itself isn't problematic; getting it all done in a reasonable time may be a bit of a problem.
I would use say four to eight identical instances of a class that starts a thread which, in a loop:
- fetches an IP address out of a shared queue;
- calls Network.Ping();
- stuffs the result in another shared queue.
Of course, both queues need their lock.
You should not pre-assign IP addresses to threads, as you can't predict how long a ping operation will take; typically those that succeed run fast, and the failing ones have to wait for their time-out. And adding more threads won't help much as I expect you will end up running in network limitations.
|
|
|
|
|
For my application I can set time-out to less then 250ms, so waiting is not a issue.
When using lock, does this mean the first thread that access "variable" locks the access and
if other threads are trying to access same "variable" wait (like thread.sleep) until it is released?
|
|
|
|
|
1.
250msec * 255 IP adr / 8 threads is still 8 seconds.
2.
yes, said locks would be exclusive, but only while accessing the queue, not while pinging (hence only a small fraction of the time). Like so (in pseudo-code!):
lock(IPadrLock) {
IPadr=IPadrQueue.Dequeue();
}
result=ping(IPadr);
lock(resultLock) {
resultQueue.Enqueue(result);
}
|
|
|
|
|
|
It is polite to up vote a helpful answer.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hey Guys
In our company we switched from Office 2000 to 2010 a couple of days ago. Now we have a very strange Problem. About 6 different applications could create Word reports (data sheets for heat plate exchangers) under Office 2000. Now under 2010 sometimes we can generate the Word report (on the first start after logon), then after the 2nd or 3rd it no longer works, Word opens but the document is blank. The error we see in those applications is "OLE Automation ERROR".
To trace the problem i wrote the following c# application:
_Application wordApplication = new Microsoft.Office.Interop.Word.Application();
var f = new FileInfo(txtPath.Text);
object o_null = Missing.Value;
object o_true = "";
object o_false = "";
object o_filePath = @"" + f.FullName;
Document doc = wordApplication.Documents.Open(ref o_filePath, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null);
String text = doc.Content.Text;
Thats the relevant part of the code, there is just some gui-code more, nothing special. Of course the Microsoft.Office.Interop.Word-Com object is referenced.
On the first launch of this programm, reading the content of a word document works perfectly. The second time i hit the open-document button in this c#-app i get the following error:
System.Runtime.InteropServices.COMException (0x800A1066): Command failed
at Microsoft.Office.Interop.Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)
To solve this Problem i tried almost everything:
Different users (all with local admin accounts)
Different computers (newly installed windows xp sp3)
reinstalled Office 2010 /repaired Office 2010
New domain user accounts
Changed the access rights in DCOM-Word-Object to local administrator
The weird thing is, after logging in the first time, generating one word report works, then the second time it sometimes works but on the third or fourth and so on time we get the error above.
I know, this problem lies probably more in the windows system and not the actual c# application (the other applications aren't written in c# but show the same behaviour), but i thought maybe someone of you could have an idea.
I would be really happy if anybody could help me solving this problem. It don't know anything more I could do!
regards from switzerland
Urs
modified on Tuesday, November 9, 2010 9:14 AM
|
|
|
|
|
Hi,
I haven't done these things myself, however I remember reading about it. Here are some thoughts:
1.
different versions of Office need different libraries ("Primary Interop Adapters"), so you would have to rebuild your app, and you can make it work reliably with only one Office version at a time. I suggest you google for details.
2.
Most articles don't discuss handling multiple Word documents; and most do close both the document and the Word application (your shortened example did not show that).
3.
Here is one CodeProject article on Office automation out of many: Word Automation using VB.NET - Part I[^]
Hope this helps.
|
|
|
|
|
Hey Luc
Thank you very much for your quick answer.
Ok so I downloaded the project from step 3.
I hit the open-doc Button: Document gets opened in MS Word
I hit the read word button: Msgbox appears with document content
I hit the read word button again: Again the msgbox appears with document content
I hit the read word button for the 3rd time: Msgbox appears with document content
I hit the open-doc Button: unhandled Exception System.Runtime.InteropServices.COMException (0x800A1066): command failed
Now the buttons don't work anymore. no open or read...
I closed the app. opened it again. first time opening the word doc works, 2nd and 3rd try no more...
I closed the app again. reopened it. again the first time was ok, any further clicks on open-doc will result in the same Exception above
There is something wrong, but I don't have a clue what...
|
|
|
|
|
That sounds weird. Some more thoughts:
1. you could try on another machine, maybe something is wrong with your Office.
2. if still no luck, you could post on that article's forum too.
3. are you doing anything special within Word? macro's? VBA code?
|
|
|
|
|
Yes it is really weird indeed.
Tried already different machines. On one i'm doing a clean reinstall right now and then i'm going to check again.
No we do not use features like macros or vba.
|
|
|
|
|