Search Results

Search found 439 results on 18 pages for 'accuracy'.

Page 2/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • OCR: How to improve accuracy - existing libraries for removing non-text 'furniture', shapes, etc to

    - by Rob
    I want to remove rectangles etc that enclose text in a screenshot image, so that I can perform optical character recognition to get accurate text from the screenshot. Background: I doing this to extract data from a legacy application for use with other applications. This is the only way to get at this data as associated files are in a closed, proprietary, binary format. I will be using AutoItScript to drive the application to show data in its UI, then I will screenshot this and feed this to tesseract. I've already had some success in automating the UI, and have been able to use tesseract to get plain ascii text out of the bitmap. There are several AutoItScripr forum articles discussing its use with tesseract/OCR but not specifically for my question. http://www.autoitscript.com/forum/index.php?s=6c32c3ece12756e635a619cdf175eff9&showforum=2 What I need to do There are thin, 1-pixel wide rectangles that closely enclose some text, when fed to tesseract, it sees them as I for example for a verticle line of the rectangle. Any thoughts on how to remove the rectangles, or best practices? I'm asking if there is a generic command line based toolset to overwrite rectangles, for example, in .png files. I could then pass the .png through this, then pass it to tesseract. Details on the tesseract release/setup I've used are as follows: Go here: http://code.google.com/p/tesseract-ocr/downloads/list - For the basic english generic character set to get Tesseract up and running and recognising your bitmapped text into ascii text, use tesseract-2.00.eng.tar.gz (current version at time of writing is: "English language data for Tesseract (2.00 and up) Jul 2007 989 KB 84845") Related questions I have already looked at on Stack Overflow http://stackoverflow.com/questions/1335581/how-to-give-best-chance-of-success-to-an-ocr-software http://stackoverflow.com/questions/2296568/analysis-and-transformation-of-the-image-on-the-basis-of-this-analysis-for-better http://stackoverflow.com/questions/2268028/reading-characters-off-of-the-screen In these, my question is not completely answered or a commercial solution is being sold. I do not want to consider a commercial solution at this stage.

    Read the article

  • timeIntervalSinceDate Accuracy

    - by mmccomb
    I've been working on a game with an engine that updates 20 times per seconds. I've got to point now where I want to start getting some performance figures and tweak the rendering and logic updates. In order to do so I started to add some timing code to my game loop, implemented as follows... NSDate* startTime = [NSDate date]; // Game update logic here.... // Also timing of smaller internal events NSDate* endTime = [NSDate date]; [endTime timeIntervalSinceDate:startTime]; I noticed however that when I timed blocks within the outer timing logic that the time they took to execute did not sum up to match the overall time taken. So I wrote a small unit test to demonstrate the problem in which I time the overall time taken to complete the test and then 10 smaller events, here it is... - (void)testThatSumOfTimingsMatchesOverallTiming { NSDate* startOfOverallTime = [NSDate date]; // Variable to hold summation of smaller timing events in the upcoming loop... float sumOfIndividualTimes = 0.0; NSTimeInterval times[10] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; for (int i = 0; i < 10; i++) { NSDate* startOfIndividualTime = [NSDate date]; // Kill some time... sleep(1); NSDate* endOfIndividualTime = [NSDate date]; times[i] = [endOfIndividualTime timeIntervalSinceDate:startOfIndividualTime]; sumOfIndividualTimes += times[i]; } NSDate* endOfOverallTime = [NSDate date]; NSTimeInterval overallTimeTaken = [endOfOverallTime timeIntervalSinceDate:startOfOverallTime]; NSLog(@"Sum of individual times: %fms", sumOfIndividualTimes); NSLog(@"Overall time: %fms", overallTimeTaken); STAssertFalse(TRUE, @""); } And here's the output... Sum of individual times: 10.001377ms Overall time: 10.016834ms Which illustrates my problem quite clearly. The overall time was 0.000012ms but the smaller events took only 0.000001ms. So what happened to the other 0.000011ms? Is there anything that looks particularly wrong with my code? Or is there an alternative timing mechanism I should use?

    Read the article

  • stopwatch accuracy

    - by oo
    How accurate is System.Diagnostics.Stopwatch? I am trying to do some metrics for different code paths and I need it to be exact. Should I be using stopwatch or is there another solution that is more accurate. I have been told that sometimes stopwatch gives incorrect information.

    Read the article

  • Accuracy of OpenGL ES Instrument

    - by Rob Jones
    I'm developing a game for the iPhone. I've decided that 30FPS is plenty so I've written some code that only allows the App to present the render buffer every 1/30 of a second. When I tried to verify this with Instruments I got varying information. On an iPod Touch (2009 edition, 32G) it reports 30 FPS for Core Animation Frames Per Second. On an iPhone 3G I get wildly varying results. And not just less than 30 FPS. I see 30 FPS on a regular basis. It actually seems to hang closer to 36-39. To investigate this anomaly I added my own FPS to the app and update it once per second. I stays right at 29 FPS on both devices. So, does anyone have any suggestions as to what might be going on? I expect Instruments to be accurate so it really concerns me that it appears inaccurate. It makes me think I have a bug somewhere, but I sure can't find it.

    Read the article

  • Compass accuracy dilemma

    - by mob1lejunkie
    I need to build compass for my application. From reading the documentation it seems there are two reasonable ways of doing this: Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purposes is unacceptable. Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD and getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() method: The documentation says this "is usually more accurate". The problem is regardless of the delay I register with listener the compass goes crazy even when the device is stationary on flat surface. Any suggestions for solving this problem will be greatly appreciated.

    Read the article

  • Can FFT length affect filtering accuracy?

    - by Charles
    Hi, I am designing a fractional delay filter, and my lagrange coefficient of order 5 h(n) have 6 taps in time domain. I have tested to convolute the h(n) with x(n) which is 5000 sampled signal using matlab, and the result seems ok. When I tried to use FFT and IFFT method, the output is totally wrong. Actually my FFT is computed with 8192 data in frequency domain, which is the nearest power of 2 for 5000 signal sample. For the IFFT portion, I convert back the 8192 frequency domain data back to 5000 length data in time domain. So, the problem is, why this thing works in convolution, but not in FFT multiplication. Does converting my 6 taps h(n) to 8192 taps in frequency domain causes this problem? Actually I have tried using overlap-save method, which perform the FFT and multiplication with smaller chunks of x(n) and doing it 5 times separately. The result seems slight better than the previous, and at least I can see the waveform pattern, but still slightly distorted. So, any idea where goes wrong, and what is the solution. Thank you.

    Read the article

  • PHP Game weapon accuracy

    - by noko
    I'm trying to come up with a way for players to fire their weapons and only hit for a certain percentage. For example, one gun can only hit 70% of the time while another only hits 34% of the time. So far all I could come up with is weighted arrays. Attempt 1: private function weighted_random(&$weight) { $weights = array(($weight/100), (100-$weight)/100); $r = mt_rand(1,1000); $offset = 0; foreach($weights as $k => $w) { $offset += $w*1000; if($r <= $offset) return $k; } } Attempt 2: private function weapon_fired(&$weight) { $hit = array(); for($i = 0; $i < $weight; $i++) $hit[] = true; for($i = $weight; $i < 100; $i++) $hit[] = false; shuffle($hit); return $hit[mt_rand(0,100)]; } It doesn't seem that the players are hitting the correct percentages but I'm not really sure why. Any ideas or suggestions? Is anything glaringly wrong with these? Thanks

    Read the article

  • Location accuracy of Google Analytics for Android

    - by BadCash
    When testing Google Analytics (version 2) for an Android project, I noticed that the Real Time map shows my location to be about 200 miles from my actual location. I'm running my project on a physical device, which leads me to believe that Google Analytics doesn't actually send any location information, but rather gets it from the phones IP address when the data is sent to Googles server. Is there any way to alter this behavior and provide my own location data using getLastKnownLocation() for example? Sending it as an actual Label/Action string would of course work, but that means I can't use Google Analytics fancy map feature to view where my users are coming from.

    Read the article

  • High accuracy cpu timers

    - by John Robertson
    An expert in highly optimized code once told me that an important part of his strategy was the availability of extremely high performance timers on the CPU. Does anyone know what those are and how one can access them to test various code optimizations? While I am interested regardless, I also wanted to ask whether it is possible to access them from something higher than assembly (or with only a little assembly) via visual studio C++?

    Read the article

  • Determining smallest number of samples for 99% accuracy

    - by test
    I'm trying to compare 100,000 records on a local database (L) with 100,000 records on a remote database (R). Basically I want to know if an elment in L exusts in R. To determine that, I have to make a request against the R for each L, which takes a long time (I know, there should be a better way, there isn't, that's the API I've got). So I would like to test a small sample of L against R, and then infer with some level of confidence how many are present in the whole R. How many do I have to test to have a 99% confidence level?

    Read the article

  • Adding up fractions in PHP

    - by Gamemorize
    I would like to create a loop that keeps adding a set fraction, here in my example 1/3, and which later I can check against for matches with integer values. Obviously when php adds 1/3 + 1/3 + 1/3 the result is 0.9999999, so i thought I could use the occasional round to help me, but this isn't working either. The idea that I had would be that .333 + .333 becomes .666 and that if rounded that would become .667, then + .333 and the result is 1. However round only seems to work, for me, if the number of digits actually decreases. so round (0.666, 3) remains 0.666 <?php $denom = 3; $frac = 1/$denom; $frac = round($frac,3); $value = 0; $max =24; for($f = 1; $f <= $max; $f++){ echo "old value is now at ".$value.".<br/>"; $value = $value+$frac; echo "value is now at ".$value.".<br/>"; $value = round($value,3); echo "rounded value is now at ".$value.".<br/>"; $valueArray[$f] = $value; //and here for ease of testing.... if (($value==1)OR ($value==2)OR ($value==3)OR ($value==4)OR ($value==5)OR ($value==6)OR ($value==7)OR ($value==8)){ echo "match!<br/>"; }else{ echo "no match!<br/>"; } } ?> Am I going about this in a totally stupid way? Accuracy when the value is not an integer is not needed, just that it can == with integers.

    Read the article

  • Floating point inaccuracy examples

    - by David Rutten
    How do you explain floating point inaccuracy to fresh programmers and laymen who still think computers are infinitely wise and accurate? Do you have a favourite example or anecdote which seems to get the idea across much better than an precise, but dry, explanation? How is this taught in Computer Science classes?

    Read the article

  • C++ floating point precision

    - by Davinel
    double a = 0.3; std::cout.precision(20); std::cout << a << std::endl; result: 0.2999999999999999889 double a, b; a = 0.3; b = 0; for (char i = 1; i <= 50; i++) { b = b + a; }; std::cout.precision(20); std::cout << b << std::endl; result: 15.000000000000014211 So.. 'a' is smaller than it should be. But if we take 'a' 50 times - result will be bigger than it should be. Why is this? And how to get correct result in this case?

    Read the article

  • Is android's motion event handling accurate??

    - by Peterdk
    Bug I have a weird bug in my piano app. Sometimes keys (and thus notes) hang. I did a lot of debugging and narrowed it down to what looks like androids inaccuracy of motion event handling: DEBUG/(2091): ACTION_DOWN A4 DEBUG/(2091): KeyDown: A4 DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_MOVE A4 => A4 DEBUG/(2091): ACTION_MOVE ignoring DEBUG/(2091): ACTION_UP B4 //HOW CAN THIS BE???? DEBUG/(2091): KeyUp: B4 DEBUG/(2091): Stream is null, can't stop DEBUG/(2091): Hanging Note: A4 X=240-287 EventX=292 Y=117-200 EventY=164 DEBUG/(2091): KeyUp Note: B4 X=288-335 EventX=292 Y=117-200 EventY=164 Clearly it can be seen here that out of nowhere I suddenly have an ACTION_UP for another note. Shouldn't I definitely get a ACTION_MOVE first? As shown in the end of the log, it's definitely not an error in region detection, since the ACTION_UP event is clearly in the B4 region. Logging Implementation details Every onTouchEvent() call is logged, so the log is accurate. The relevant pseudo-code for the ACTION_MOVE logging is: Key oldKey = Key.get(event.getHistoricalX(), event.getHistoricalY()); Key newKey = Key.get(event.getX(), event.getY()); Question Is this normal behaviour for Android (the jumping in coordinates)? Am I missing something?

    Read the article

  • What Determines the Default Setting of the x87 FPU Control Word?

    - by Rick Regan
    What determines the default setting of the x87 FPU control word -- specifically, the precision control field? Does the compiler set it based on the target processor? Is there a compiler option to change it? Using Microsoft Visual C++ 2008 Express Edition on an Intel Core Duo processor, the default setting for the precision control field is "01b", meaning double (53 bit) precision. I'm wondering -- why is the default not "11"b, or extended (64 bit) precision? (I know I can change it using _controlfp.)

    Read the article

  • Floating point precision in Visual C++

    - by Luigi Giaccari
    HI, I am trying to use the robust predicates for computational geometry from Jonathan Richard Shewchuk. I am not a programmer, so I am not even sure of what I am saying, I may be doing some basic mistake. The point is the predicates should allow for precise aritmthetic with adaptive floating point precision. On my computer: Asus pro31/S (Core Due Centrino Processor) they do not work. The problem may stay in the fact the my computer may use some improvements in the floating point precision taht conflicts with the one used by Shewchuk. The author says: /* On some machines, the exact arithmetic routines might be defeated by the / / use of internal extended precision floating-point registers. Sometimes / / this problem can be fixed by defining certain values to be volatile, / / thus forcing them to be stored to memory and rounded off. This isn't / / a great solution, though, as it slows the arithmetic down. */ Now what I would like to know is that there is a way, maybe some compiler option, to turn off the internal extended precision floating-point registers. I really appriaciate your help

    Read the article

  • Is there a floating point value of x, for which x-x == 0 is false?

    - by Andrew Walker
    In most cases, I understand that a floating point comparison test should be implemented using over a range of values (abs(x-y) < epsilon), but does self subtraction imply that the result will be zero? // can the assertion be triggered? float x = //?; assert( x-x == 0 ) My guess is that nan/inf might be special cases, but I'm more interested in what happens for simple values.

    Read the article

  • Exact textual representation of an IEEE "double"

    - by CyberShadow
    I need to represent an IEEE 754-1985 double (64-bit) floating point number in a human-readable textual form, with the condition that the textual form can be parsed back into exactly the same (bit-wise) number. Is this possible/practical to do without just printing the raw bytes? If yes, code to do this would be much appreciated.

    Read the article

  • Manipulating and comparing floating points in java

    - by Praneeth
    In Java the floating point arithmetic is not represented precisely. For example following snippet of code float a = 1.2; float b= 3.0; float c = a * b; if(c == 3.6){ System.out.println("c is 3.6"); } else { System.out.println("c is not 3.6"); } actually prints "c is not 3.6". I'm not interested in precision beyond 3 decimals (#.###). How can I deal with this problem to multiply floats and compare them reliably? Thanks much

    Read the article

  • Floating Point Arithmetic - Modulo Operator on Double Type

    - by CrimsonX
    So I'm trying to figure out why the modulo operator is returning such a large unusual value. If I have the code: double result = 1.0d % 0.1d; it will give a result of 0.09999999999999995. I would expect a value of 0 Note this problem doesn't exist using the dividing operator - double result = 1.0d / 0.1d; will give a result of 10.0, meaning that the remainder should be 0. Let me be clear: I'm not surprised that an error exists, I'm surprised that the error is so darn large compared to the numbers at play. 0.0999 ~= 0.1 and 0.1 is on the same order of magnitude as 0.1d and only one order of magnitude away from 1.0d. Its not like you can compare it to a double.epsilon, or say "its equal if its < 0.00001 difference". I've read up on this topic on StackOverflow, in the following posts one two three, amongst others. Can anyone suggest explain why this error is so large? Any any suggestions to avoid running into the problems in the future (I know I could use decimal instead but I'm concerned about the performance of that).

    Read the article

  • erroneous Visual C float / double conversion?

    - by RED SOFT ADAIR
    In Visual C++ i wrote the following sample in a C++ program: float f1 = 42.48f; double d1 = 42.48; double d2 = f1; I compiled the program with Visual Studio 2005. In the debugger i see the following values: f1 42.480000 float d1 42.479999999999997 double d2 42.479999542236328 double d1 by my knowledege is OK, but d2 is wrong. The problem occurs as well with /fp=precise as with /fp=strict as with /fp=fast. Whats the problem here? Any hint how to avoid this Problem? This leads to serious numerical problems.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >