Huge image resample on the fly - image

I have a huge image (234 megapixels) I want to plot in a way that it is dynamically resampled depending on the size of the area the user wishes to see. Is there any tool that supports doing this, or will I need to do this myself?

Typically the techniques to do this are referred to as (Image) Tile Rendering. Basically this is how applications such as Google Maps work.
A quick search on google turned up an OpenGL library for doing this for you (http://www.mesa3d.org/brianp/TR.html). I'm sure there are others that you should be able to discover if this library doesn't fit your technology needs.

Related

vector tiles map viewer for own data and with interaction

there are same solutions for rendering vector tiles on client-side webbrowser. But i don't find one for my expectations.
I want to display a huge amount data (points, polygons) in a map viewer. I need vector data because of dynamic styling and interactions of the features. Its too much to load all in Google Maps and from my perspective its the right way to use vector tiles, because only nessesary and aggregated data for the viewpoint will be load.
So i dont need to style the basemap like i found thousands of examples. I only want to load my data as a vector tile layer on a raster (google satelite). But my features should by stylable, need to have normal events like clicking or mouseover and store properties. And last but not least it should be really fast ;-)
What viewer i need? And what is the workflow to create and serve the data as vector tiles?
I have been working on a similar problem, strech - technologies are evolving, but mapbox-gl.js is one viewer you can use. You might be able to use mapzen's system as well, but I haven't tried their system with large amounts of features, whereas I know mapbox does work better than leaflet and openlayers for your scenario.

Procedurally generated GUI

I've developed an interactive audio visualization engine. I need to make its GUI scalable to various screen sizes with various PPIs (this includes both very large screens and mobile devices). Designer simply sent me a PSD with graphical representation of supported widgets. I'm exporting these into PNGs. The problem is that those bitmaps are of course not scalable and looks ugly.
I've thought about several ways how to achieve resolution and PPI independent GUI:
Export PNGs with various sizes and select the current set on runtime (waste of space simply for storing bitmaps in various resolutions)
Use scale 9 images only (no fancy stuff)
Use SVG (not supported by rendering APIs, could use smth like nanovg for OpenGL but what to do with raw framebuffer then?, also performance problems and too much complexity for what I need)
I came to an idea to pregenerate bitmaps at runtime for specific device once and use them afterwards. Are there any specific libraries for that and maybe already available themes which I could employ for now? I imagine tool could work similarly to how cairo graphics library or javascript canvas work by reading command list and outputting a bitmap. Any other ideas?
One possible solution is this:
CPlayer is a procedural graphics player with an IMGUI toolkit. It can
be used for anything from quick demos, prototyping graphics apps, to
full-fledged apps and games.
http://luapower.com/cplayer.html

Some options for making augmented local maps with d3

I am new to d3 geo. My task is to make a map of Boston and add some interactive features to it.
So far I've been able to get an outline of Boston. But the base map should be comparable to something you'd see in Google Maps - it should have buildings, roads, street names and city names, rivers, etc. A basic geography that makes the region more familiar.
For now, I don't need to pan, and may have just two or three zoom states.
All the visualizations I've seen that overlay interactive features onto maps like this seem to use images for the underlying maps: windhistory, polymaps, google maps and more. So I guess my questions are:
Why do some maps use images for the "backdrop"? Is it just the easiest way to build on top of existing maps? Is it more performant?
If I go with the images approach, are there any limitations to the features I can add? I'm hoping to do things like windmaps, animations, heatmaps, etc.
What are the copyright implications for using images? I imagine the answer to this is, "depends on which images I use," but are there some standard libraries that have no strings attached? For example I know if I use Google Maps, I have to display their logo, there's an API limit, etc. Are there any standard sources that are completely open?
Are there any examples where geography is added purely through TopoJSON?
Sorry if some of these seem obvious, but I am completely new to maps and just don't know the standard practices. Thanks for any help!
A quick take on your questions. Hopefully someone with more mapping experience can give you more detail:
Why do some maps use images for the "backdrop"?
File size and computation time, mostly. Drawing complete maps with buildings, roads, and topography requires a lot of data and a lot of time for the browser to render it. If your browser DOM gets too complicated, it can slow down all interactions even after the original drawing.
If I go with the images approach, are there any limitations to the features I can add?
There's a reason most interactive maps use multiple layers. The background images are best for the underlying "lay of the land" type imagery, anything you want to be interactive should be on top with SVG.
What are the copyright implications for using images?
If you're using someone's images, you have to follow their licence. You might want to look at the OpenStreetMap project.
Are there any examples where geography is added purely through TopoJSON?
I suppose that depends on what you mean by "geography"; Mike Bostock has generated topoJSON for a variety of features based on US Atlas data.
As for whether it makes sense: TopoJSON encodes paths/boundaries directly, and encodes regions as the area enclosed by a set of boundaries. You could use it to encode streets and rivers and even building outlines, but you're not saving any file size relative regular GeoJSON because those paths generally aren't duplicated the way that region boundaries are. Relative to using image tiles, any improvement in file size would be countered with increased processing time.

Magnify a streaming webcam image in OS X

I need to take a streaming image from a USB / UVC compliant web camera and digitally magnify it. The application is for people with low vision to be able to read.
The application must run on a MAC / OS X.
I am trying figure which framework to use. I did find that I can use the CALayer and apply an affine transformation, however the image is grainy as you would expect. I need to smooth it out with some method such as anti-aliasing, or some other method..
I know this is a very general question, but I need to know how to focus my efforts. At the moment I am chasing my tail reading docs, etc.
Anybody have a suggestion on what OS X Frameworks, also what algorithms or methods to smooth out grainy magnified images?
Thanks!
You're basically talking about interpolation--resizing images with some intelligent filling in of information rather than just chopping the pixels. There are various methods you could look into, such as "bilinear", "bicubic", etc. In the Apple API you might want to look at CGContextSetInterpolationQuality, which could help with some of the noise you're seeing. OpenCV is a very extensive image processing library which is readily available on OSX and has a C++ API.
Keep in mind, though, that you will ultimately be limited by the quality of the web cam, and the environment (especially lighting). There are "super resolution" techniques to stitch multiple images together, but they may not be applicable if this is a live-video application.
I can't overemphasize the importance of good lighting for applications like this. If you think about doing an iOS version of this, look at what apps like Turboscan do using the flash and a "best-of-three" technique. It's amazing what high-quality images you can get of printed text that way.

Image memory in gtk+

I'm new in the field of gtk+. My question is that is there a way to render images very fast in gtk??? I mean is there a way to directly alter the image data in frame buffer or video ram or something like that? Do pixbufs do the same thing?? I need to apply this for a scrolling example. Is cairo good for fast rendering of images?
GTK is a high-level toolkit, which means that you can't do that sort of low-level manipulation. However, GTK has plenty of facilities for fast scrolling built in. You can also render images to Cairo surfaces in memory. What are you trying to do exactly?

Resources