Adaptive thresholding for scanned images - vb.net

I would like to improve a number of images accquired with document scanning, does anybody have any VB sample code for dynamic thresholding to achieve a result something similar to the images shown at the bottom of the page;
http://www.datastor-ltd.co.uk/component/content/article/39-microfilm-scanning/104-the-benefits-of-scanning-in-greyscale

Have a look at Otsu's method. It's quite simple an easy to implement -- you should be able to transform Wikipedia's pseudo-code into VB in no time.
Otsu's method will give you a threshold (single value) -- you can then use that threshold to binarize the image. The thresholding code is also trivial.

Related

Change display properties of graphics in lithium theme

First of all thanks to the developers of blogdown. I just started my first blogdown-blog on github / netlify and it looks really nice.
There is one issue that I would like to change:
On mobile devices, graphics from R code chunks are displayed in a way that I can see only the left part of the graphics. Ideally, I would want to reduce the size of the graphics on mobile devices so they fit to the height and the width of the screen.
Is this possible? Where would introduce changes?
Here is the link to my blog: https://sbloggel.netlify.com/
(I have only the most minimal knowledge about web programming).
Thanks in advance for any advice or pointers to relevant resources to start learning and best greetings,
Sebastian
I just accidentally found a potential solution that is sufficient to me.
Most (maybe all) figures on my blog will be produced by R code chunks.
By specifying the 'out.width'-parameter in the code chunk that produces the figure, the size of the figure will be fitted to the screen size as far as I can see:
```{r out.width = "100%"}
plot(1:10)
```
Thanks nonetheless!

See the result of a query on the map with Arcgis Api JS

Let's say you enter these parameters. Which method of the "ArcGISImageServiceLayer" class can serve to display the image of the mosaic dataset? In the attached image the result is an image, but I do not know how to visualize it on the map.
Part of my code is this, I used the "queryVisibleRasters" method to try to visualize it, but it did not work, any suggestions are very well received, thanks

Read code markers of a images

I do not know the real name of this type of "QR" they are used in augmented reality and other tracking applications.
Here is a image of what it looks like.
I want to build a vb.net program that finds as many of this in a image. I do not need to get angels and so. Only a number.
The marker need to handler +10K of numbers and tolerate rotation.
I did use https://github.com/jcmellado/js-aruco as a template to solve my problem.

Draw connections/paths between elements in XAML

I am currently developing an app where you can move different elements (boxes) and I need to display several arrows between them to show off connections and data flows. I don't want to use simple lines because this looks crappy. I recently used this great JavaScript library which does the thing I need for HTML: http://jsplumbtoolkit.com/jquery/demo.html
Is there something similar for XAML out there?
Thanks in advance!
I think, you should use bezie curves. From MSDN
To create a quadratic Bezier curve, use the PathGeometry, PathFigure, and QuadraticBezierSegment classes.
Simple example for creating bezie curves

generate geo tiles from vector data

i am facing this problem : I have in my database some vector data (polylines ...) which describe many world/country/region/cities boundaries.
I would like to have an interactive map on thoses areas.
When i render those data in the browser (data are sent in geojson) this is slow (i'am not surprised).
The next reason, is to generate some raster tiles to represent the areas at different zoom level and to have a way to make the relation between a click on a area and the area selected (to display more info).
I am a newbie in geo tiles :
What is the best tool to generate png/jpg tiles from vector data?
How to make relation between an area clicked and a "id" in database?
I know my questions are very large, but if you have some advices ...
Thanks!
I recently wrote a blog posting on how to improve the rendering speed of raster tiles:
http://blog.webfoot.com/2013/03/12/optimizing-map-tile-generation/
As for connecting a click to a jurisdiction ID, I don't think there is a shortcut: you need to translate the click into lat/lng (or Vast Coordinate System, as I describe in the blog post) and then do a point-in-polygon check. If you are using PostGIS, then you can do an ST_Intersects.
NOTE: if you are using MySQL, the intersection is done with bounding boxes, not the polygons. It still is possible: you just need to grab a point-in-polygon function from somewhere to check which polygon if a bounding-box check gets you more than one.
Here is an example of dots you can click on:
http://maps.webfoot.com/demos/CanadianStimulus/CanadianStimulus.html
Note that because people aren't precise with clicking (especially with tiny dots), I actually make a few pixels around the dots "live" as well as the single-pixel dots. You can also click away from the dot, and then it will show the polygon (which in this example's case, is the federal electoral district).
There is a MongoDB Plugin datasource for Geoserver, a full featured WebGIS Server. You can use it to build up a map rendering service (a WMS actually) ofyour data. Then use Geowebcache to generate tiles of your map.
This way you can use fully featured WebGIS stack, which allows you to manage additional datasources, and easy tile subset recreation if portions of your data get updated.
Also querying features on a map (relation map position to element in database) is provided through Geoservers WFS implementation.