Edit image, using openGL - ios4

I have been doing some searching the last couple of days and I have been curious how to do this. I have a UIImagePickerController.
So I want to add a effect like black and white, sepia, etc. I am creating a custom UIImagePickerVController and I am curious. Can this be done with OpenGL ES? If so, how?

This is possible through the use of pixel shaders using OpenGL-ES 2.0. You could also write an Objective-c++ routine that gets all the pixels of your image into an array then applies a custom algorithm to modify the color of the image.
Edit:
Here are some links that might help get you started.
http://www.sunsetlakesoftware.com/2010/10/22/gpu-accelerated-video-processing-mac-and-ios
http://www.dreamincode.net/forums/topic/76816-image-processing-tutorial/
http://www.efg2.com/Lab/Library/ImageProcessing/Algorithms.htm

Related

Axes on image in IDL

I have an image displayed in an IDL window using the TV command, and would like to add x and y axes to the image. Seems straightforward, but I can't find a way to do it.
Can anyone help with this?
Thanks
Are you tied to direct graphics, i.e., TV? Easiest way to display with axis is to use IMAGE function:
im = image(arr, axis_style=1)
I would echo Mike's answer - go with the new graphics Image function if possible.
If you absolutely have to use direct graphics, then I would recommend using David Fanning's coyote graphics wrappers:
http://www.idlcoyote.com/idldoc/cg/cgimage.html
It's still a lot more work to do this using direct graphics, but at least with the "cg" commands it's easier.

Making custom, fictional maps with D3.js

I'm kicking around an idea for a side project and am looking for advice on which direction to go in terms of technology. I've done some research already, but am still fairly confused as to what the realistic options are.
I'd like to make an interactive map based on a fictional world (think Middle Earth), including a timeline filter and a details section for additional information on an event or location.
Desired Features:
map on the left
details pane on the right
timeline slider/filter at bottom
Territories
color for political affiliation
displays details in details pane
labels
labels for cities
Hurdles:
Get a clean map image to work with
Map image into intermediate format (svg, geojson, topojson?)
Display map on webpage, style map, add animations, etc
Technologies
SVG
I'm pretty sure I could code all of this in SVG using events and boundaries. I've already been able to create SVG Paths from the image using GIMP, so converting the map into an SVG file seems plausible.
The issue with doing it this way is I would end up doing all the work the hard way when there seems to be lots of frameworks for this kind of thing already.
Kartograph
La Bella Italia is a very nice example and would serve as a good starting point. I love the trade route animations and the border styling with the glow filters.
The bonus here is that I know I can make an svg map, which is all this would need to get up and running.
My issue here is it doesn't seem like Kartograph is as rich of a platform as D3.js. I'm not sure if I can double dip and link some D3 stuff with the kartograph events. If I could, that might be the solution.
D3.js
The sliders, animations(hover and selection), and topojson seem like they would be perfect. But the main issue I have here is getting my image converted into a GeoJson format. From what I can tell these formats are strictly for Real World maps, using longitude/latitude.
So there you have it! I'm hoping there is some good news on how I might convert my map image into topojson so I can enjoy the benefits of D3.js. If not, I suppose I could just try kartograph and wire the events up with D3 controls.
Thoughts?
I'm currently writing my master thesis and I have the same topic like you had these days. I called my project Arda Maps. Feel free to ask me anything if have techonology questions.
I'm using the following frameworks/tools in my project:
QGIS
JQuery
D3.js
GeoJSON/TopoJSON
TimeGlider

Can I create a Calligraphy look with SVG?

is it possible to create a stroke with a dynamic width with SVG? I want to achieve a Calligraphy look like here, here or here.
Is this even possible? It seems customization of strokes in SVG is fairly limited. Even gradients in strokes seem to be non-trivial (see here).
There is a proposal to add into SVG standard a mechanism, that does exactly what you want:
http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/Variable_width_stroke
http://lists.w3.org/Archives/Public/www-svg/2013May/0041.html
There's even an example implementation available here:
https://rawgit.com/birtles/curvy/master/index.html
It is, however, by no means official and we cannot be even sure it'll ever be.
Until then you'll need to stick to Bezier curves and object filling:
You can also use calligraphic fonts, for example - Tangerine available on Google CDN:
This approach requires less work since you don't need to draw everything from scratch, but then again, using third party fonts leaves you with little control over the final result.
You can't dynamically adjust the stroke of a path element. However you could draw a path, use a fill color on it instead of stroke, then double back upon the letters at a slight distance away from the original line.
Also, if you are using the SVG on the web then you can use css fonts on text elements. There are some pretty good cursive fonts that you can use for free... just check google web fonts.

Indicators library in svg, vml or canvas

I am working on an application where I need to display color coded indicators. The standard colors will be red/amber/green, but I need to be able to pick any color (e.g. by hex value). The colors are updated dynamically by a script, based on data (dashboard style).
Are there libraries that could help me? I am thinking in particular about using svg or canvas graphics that the script could modify.
Note: the question has been rephrased to better explain the context.
I like this collection on WikiCommons. They are in SVG
http://commons.wikimedia.org/wiki/Tango_icons
Here are a couple of links to start with:
nounproject
openiconlibrary
openclipart
small iconset for use with raphaƫl

Detect an object in image using IMAGEMAGICK

I have an image with Gray Background and 'CUP' in center of it... I want to detect the boundaries of the cup in this image.. After detecting CUP I want to extract the CUP from the image using IMAGEMAGICK.. Note I have many images with different objects (like CUP) in the center and with different background color .. So I am looking for a solution which is applicable to all of them..
Plz comment..
Maybe you could use edge-detection algorithms to isolate the shape of your main object: http://en.wikipedia.org/wiki/Edge_detection
You could also look into the code for the EdgeImage effect in ImageMagick, to see how they do it...

Resources