|
jkirkerx wrote: 9 pin dot matrix Wow that is so 80s tech. I am not surprised you are having trouble getting OCR to read it. I would suggest going to ink jet/laser but I guess multi part forms are embedded in their procedures.
Can you up the contrast on the printer, or get the printer to add a bar code although that will probably be as difficult to read as well.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I found the printer code template for that form yesterday and I think I can edit it and go without compiling.
Make that number bold and letter quality LQ.
I'm going to a manufacture Thursday, Viewsonic and I'll take a look at how they do it.
I'm thinking about laser printing the form on colored NCR paper, changing the print process and media.
Yes very 80's. But the accounting program is rock solid however and very lightweight.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
It seems like you should ditch the old FoxPro if you can, especially since you don't know
how to compile. You might search google on "compiling FoxPro"; you might get lucky.
Don't know how old your printer is but some manufacturers like the one I use to work for
had some models with built in resident ocr even on some of their 9 pin models.
They did this because of the reason you describe of low quality and the resident ocr was tuned
in the printer software to get the best quality from the printer. But still it wasn't the best but was usually readable on the first copy but it was 'ify' to whether it would read on more than the first or second copy of the multicopy form.
So you might check you printer features to see if it supports ocr.
Also most printers have a printer specific escape command that will put the printer into letter
quality mode. You will have to look at your printers command reference to see if it supports that.
It's usually a simple sequence to send to the printer.
And some printers have the ability to select these features from their front panel feature list;
that is if they have one. However this puts some of the responsibility of setting up the printer
onto the user which is usually undesireable because users don't really like to mess with setup
procedures.
Hope this helps
Best regards
-- modified 21-Jan-19 21:43pm.
|
|
|
|
|
I'll go that road for half a day and do the research on escape codes. Did it once back in 1987, should be able to do it again. I'll look into printers as well. But the above post explains my other idea.
Thanks for your suggestions!
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I once created a .net application using a combination of AForge imaging library to crop the area of the page I needed and do some image processing to sharpen the cropped image, before running it through Tesseract.net to OCR, it worked suprisingly well but took a bit of calibration to get the image filters/manipulation set up to get the best results.
|
|
|
|
|
That sounds promising. I thought about photoshop or something.
I'm gonna start running down the list of experiments tomorrow.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
If you are still considering OCR as an approach, the LEADTOOLS OCR toolkit has a native recognition module specifically for 9 Pin Dot Matrix text that may give good results for you. (Disclaimer: I am an employee of the vendor of this toolkit).
This native recognition module is part of the LEADTOOLS OmniPage OCR Engine and can be set when determining recognition zones for a particular OCR document.
The code to set this type of zone will look like this:
using (RasterCodecs codecs = new RasterCodecs())
{
codecs.Options.Load.XResolution = 300;
codecs.Options.Load.YResolution = 300;
codecs.Options.Load.AllPages = true;
RasterImage sourceFile = codecs.Load(fileName);
_ocrDocument.Pages.AddPages(sourceFile, 1, -1, null);
OcrZone ocrZone = new OcrZone();
ocrZone.Bounds = new LeadRect(50, 50, 300, 100);
ocrZone.ZoneType = OcrZoneType.Text;
_ocrDocument.Pages[0].Zones.Add(ocrZone);
NativeOcrZone dotMatrx = new NativeOcrZone();
dotMatrx.Bounds = ocrZone.Bounds;
dotMatrx.ZoneType = NativeOcrZoneType.Text;
dotMatrx.RecognitionModule = NativeOcrZoneRecognitionModule.DotMatrix;
_ocrEngine.ZoneManager.SetNativeZone(_ocrDocument.Pages[0], 0, dotMatrx);
}
|
|
|
|
|
Wow $6k to get the engine and the OCR add on for a single user is well beyond what I would have expected. Note the OP is either an independent developer or a very small shop, unless he can get a client to pay for it I'd be astonished if 6k was acceptable.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I'm a small shop and 6K will cut too far into my margin.
But I'll check it out to see how much better it is.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
I give it a try tomorrow. See how it works and check the price.
Thanks!
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Just wanted to leave a paper trail here on this subject in case someone else attempts it.
I had my first level of success this morning. I used the one dudes idea of image processing first, then OCR the document.
So I fiddled with Photoshop and tried about 20 different things with just getting a little better result. Then I went back my photography days to sharpen images and tried a few of those techniques. The best result came from auto contrasting the image to pure black and white and then using Unshape Mask at Max values to exaggerate the dot matrix printing into a filled in character.
All the Dot Matrix translated very well along with the pre-printed stuff on the form using the Microsoft Windows 10 OCR and my Test App written in C# Winforms. The IronOcr in 3 different modes wasn't able to read the image and got worst. But I'll play around with the settings some more.
So I'm thinking I'll head down this road first. Consider a scanner, image processing and OCR before I start messing with printer escape codes, or changing the printing system all together.
Perhaps I should of looked for image packages on Nuget first before I wrote this. Hope it doesn't turn into a C++ thing. But I don't think I'll have to spend $1K to $6K for an OCR solution. Maybe this is what OCR solution do in the first place.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Good morning folks,
I've created an image to use as a splash screen for my application, I've tried using this in two ways:
1) Added as a background image to a from at design time with a layout of none.
2) Added a picture box and then assigned the image with a size mode of normal.
In both instances the image displays correctly at design time but then grows by about 20% at run time.
I know I can change the layout/size mode to correct for this but the image goes from lovely and crisp to all blurry.
Can anyone suggest what is going wrong here please?
I'm assuming it is something to do with a miss match of size units between pixels and em etc but I'm struggling to find anything at all.
Apologies I've not really got any code to show as its been created at design time and not coded.
The IDE being used is visualstudio express 2015
|
|
|
|
|
Take a look at the source code in the designer module, which will have the same name as your main form, with an extension of .Designer.cs . That will show you all the details of the generated code. Alternatively you can look at the properties of your image to see that it fits correctly into the form.
|
|
|
|
|
Thanks for your reply Richard.
I think I've just discovered this is something to do with Windows 10, it scales apps by 150% by default for some reason. Visual studio appears to have been fighting with this.
|
|
|
|
|
|
i have been trying to get my program to start but it keeps refusing to.can anyone help me find a solution to the error below.thanks
This site can’t be reached localhost refused to connect.
Search Google for localhost 58962
ERR_CONNECTION_REFUSED
|
|
|
|
|
|
I have tried a lot of them but I keep getting the same thing
|
|
|
|
|
I've recently had these too, is it for a CDN URL, i.e. JQuery, Angular etc? if so check your firewall to ensure that it isn't blocked.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Try to open properties of project..
Change port number.
like this
Or use IIS to attach your web folder instead of using IIS Express.
Regards
Toha
|
|
|
|
|
You have already posted this in the ASP.NET forum, which was the correct place to post it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You must only check all source code.
|
|
|
|
|
I'm programming in C# using Visual Studio Express 2005 and my application has a regular WinForms form, which I will refer to as "main form". From this form I create another non-modal form, which I will refer to as "secondary form". I usually have a lot of different application running on my computer and sometimes I want to easily bring the main form to the front from the secondary form. So, in my secondary form I have a button labeled "Show Main Form" and when I click it, it calls mainForm.BringToFront(). If there is some kind of error, then the main form will show a modal error MessageBox, which has the main form as its parent. When this happens, I am unable to click the button on the secondary form. In fact, I can't do anything with the secondary form (it's like it's completely disabled) unless I click Ok on the MessageBox, but to do that I need to first locate the main form, which is difficult because I have so many applications running. Can someone please help me, how can the secondary form still be running as usual when the error MessageBox is showing?
|
|
|
|
|
Not sure how to describe this or If I'm 100% correct here.
You seem to create the popup box in the same thread as your "main form" and "secondary form" are created in. Since you have specified the popup box's parent as your "main form" it's only expected that the popup box blocks everything for that thread. Therefore your "main form" and "secondary form" is blocked. You still need to look up the "main form", in your jungle of application, to gain access to your popup box.
Without viewing your code it's not that easy to suggest a fitting solution.
|
|
|
|
|
My code is very simple. The main form is created by the designer in the usual way:
public partial class Form1 : Form
Program.cs will create an instance of main form (or actually Form1):
Application.Run(new Form1());
Then I have a class called SecondaryForm, also created by the designer:
public partial class SecondaryForm: Form
In main form (or actually Form1), I create an instance of SecondaryForm:
SecondaryForm secondaryForm = new SecondaryForm();
secondaryForm.Visible = true;
When an error occurs, I show the MessageBox in main form (or actually Form1):
MessageBox.Show(this, "An error occurred!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|