Surprisingly large difference between tess4j and tess-two - tess4j

tess-two seems to work pretty well when I know EXACTLY the location on screen where the text I want to OCR is.
Now I'm trying to scan for text against a busy background, and it's not working quite as well.
annotated android screenshot
I built a stand-alone driver using tess4j and I get significantly better results:
annotated desktop screenshot
I'm using tess-two 5.4.1 and tessj4 3.0.
To scan I'm using TessBaseAPI.PageSegMode.PSM_SPARSE_TEXT_OSD and iterating using TessBaseAPI.PageIteratorLevel.RIL_TEXTLINE
Any ideas why the results are so different? Does tess4j do some kind of preprocessing that is leading to a better result?
Thanks in advance!

Related

R Leaflet Limitations? Too much data?

I found a workaround for this that actually worked better for the project I was working on, but I'm still curious.
I was creating some maps in R using the leaflet package. The code ran well, but I was using about 1.2 million rows of data and I had 7 layers that I wanted to include in my map. R studio struggled with, so I saved the map as an HTML file, closed R studio a tried viewing the map in a browser. It would load after a while, but would always freeze and crash. My workaround was to create each layer as its own map. R studio struggled a bit with this, and the HTML files can be a bit sluggish, but everything works.
Does anyone have experience or thoughts on ways to better handle large data sets like this while working with a leaflet?
A second question if you will indulge me- I couldn't figure out how to add a title to the map that wasn't overly distracting from the data I was presenting, which was about the only drawback of splitting the maps up.
you could try the leafgl-package: https://github.com/r-spatial/leafgl
It uses web gl to render leaflet with >1M points blazingly fast compared with the 'default' leaflet-methods...

improving rGL HTML performance with multiple figures (mfrow3d) + rglWidgets

i am using RGL to produce a panel of multiple figures through the mfrow3d command.
for the most part, the html produced from the call to writeWebGL is exemplary.
the one caveat is that for multiple figures (be it 6 or 16), i have noticed a bit of lag when attempting to manipulate any one of these figures (to pan/zoom/look around).
an example can be found here: http://fluxions.dydx.ie:1338/schiz.html (warning, 100MB html file haha).
i wanted to ask people here if there is anything i can do in terms of using the "reuse" argument that may speed up performance.
additionally, i wanted to ask if there is any benefit to using rglWidgets and if there is a small example someone could provide in porting a writeWebGL call produced from the following:
https://johnmuschelli.com/WebGL_Interactive_Paper/supp_1/supp_1_wrap.Rmd
to rglwidgets (in hopes that the reuse argument in widgets may improve performance due to my use of mfrow3d).
i am not familiar on how to capture a multi-figure layout with multiple calls to contour3d as a scene that widgets can use.
dr duncan murdoch has gotten back to me and said there probably is not a way to do this, so i guess i will close it.
he is very helpful and i thank him for his support.

Can I use R without R studio?

We are confused on the difference between R and R studio. We do the majority of our work on R studio but we were required to download R as well. Is regular R necessary for R studio to work?
Indeed, R is the real technology you are using. RStudio is an IDE which makes it easier and nicer. Still, it's just working on top of R.
You should be comparing RStudio to a regular text editor. You can use R without RStudio, you might for instance use a text editor plus a terminal window.
As mentioned by #NewUser Rstudio is simply an IDE, and other alternatives do exist. Check the answer to another question here for a long list of alternatives.
Rstudio is however the most popular IDE, and it comes with quite a few benefits. Auto completion of code, the interactive window for html applications, interactive graphics window, easy connection to various databases with automatic connection string complection etc. However some prefer to use alternative IDE's and you could even set up notebook++ to write and execute your code through the terminal.
The most obvious alternative is likely the R IDE. The minimalistic IDE that comes with the installation has some benefits as well, while being restrictive in others. The most obvious benefit is the far lower usage of memory for each window. My thesis supervisor is a hard-lover of the standard IDE, while a friend of mine simply uses it in cases where he needs to View(...) very large data, and for some reasons can't live with a summary output.
That said this question basically has nothing to do with programming, and is technically considered "off-topic" on stackoverflow as it is asking for recommendations. Other websites in the SO family are simply better for these type of questions.
R studio can be considered as a "skin" over base R, which makes it more user friendly. However, base R can certainly be used without R studio.
The main difference you will experience at a beginner level is that you will need to use functions such as View(), rather than cntrl clicking a dataframe etc.

How to use specific a GPU device for learning in keras R?

I have two gpu device GTX 1080ti.
I do work in Rstudio with keras.
So, I want to use specific gpu device to each script.
I have heard for this, some people recommend to use with(tf$device("/:gpu1").
But, I am using R not python.
I can't find the tf function and device funtion.
And another recommendation is to use os.environ["CUDA_VISIBLE_DEVICES"]="1".
But, I can not find the os.environ function.
Please help me anybody who can help.
So, please tell me more detail about code for this problem.
Thank you.

Line by line analysis and plotting on multiple monitors during presentation

I am preparing a presentation on data analysis and I am provided with a 2-3 monitor and projector head-up. I would like to use one monitor(+projector) for code, one monitor(+projector) for console display and one monitor(+projector) for plots. Monitors are for me, projectors for the audience.
I would also like to run the code line-by-line (similar to the Ctr-Enter feature of RStudio); copy pasting code won't work. I want to use interactive graphics, analysis and plotting on-the-fly so any pre-done analysis won't work.
Is there any way to achieve this? Although Rstudio is a fantastic tool, a rather basic (and one might say easy) feature like panel detachment is not being developed although frequently requested. This would be probably the best solution to what I want.
UPDATE: Any OS (Win, Mac, Linux) will do.
You should be able to use the vanilla R GUI. Within that you have separate panels/windows for code, console, and plots (with as many plot windows as you want by calling a new device like quartz()). You can evaluate a line of code from the script using Cmd-Enter(mac) and Cntr-Enter (pc) plus the default settings highlight the line of interest. You could also use emacs in the same way, which I find much more powerful and fun.

Resources