CLI : Is There A Script To Skew Image With A Curve - image

Looking for a script that will skew an image for me through the command line.
The skew needs be a curve; stead the angle skews offered by imagemagick or lunapic.
I want it to look like it is placed up in a celestial sphere.
Basically able to fit inside of these boxes.
Alsor, can CSS do it?
Thanks.

Got it using a program called POVRay and a little bit of script hacking... if interested, check it out the full explanation at linuxquestions.org: http://www.linuxquestions.org/questions/showthread.php?p=4764944

Related

Process noisy image to get clean polygons

I am implementing image segmentation task and the output has a significant noise. I want to process the output image by removing all the noise and keep only the rectangle boxes (or polygons).
Can someone please suggest good image processing techniques for this?
For instance, the images which we need to process looks like following:
and the desired output should be something like following:
you should try these techniques probably it work on your problem.
4 Image Segmentation Techniques in OpenCV Python

A photo to vector 'scribbled line' algorithm

I would like to build an algorithm that turns a picture into a scribble line that resembles the original picture.
An example would be this:
into this:
The second image is drawn by hand with one stroke.
I am not sure where to begin experiments. My intuition would be to desaturate the image and simulate "drawing" a line with some quasi-randomness that draw more lines in places where the image is darker.
Ideally what I would like to get is a vector image in the end with one path.
Thank you
Disclaimer: I have already asked this question on dsp.stackexchange 3, but there was no answer. I am not sure if that was the right place to ask.
I realise this is not purely programming question, but maybe someone can point me in the right direction?
Try this ... not mine, but pretty neat.
The 'files' tab of the code page contains the original image file.
Processing is a fun language for doing this kind of stuff :-)
https://www.openprocessing.org/sketch/486307
Interesting option (less arty than your example =^) :
http://cgv.cs.nthu.edu.tw/projects/Recreational_Graphics/CircularScribbleArtsPoster
https://cgv.cs.nthu.edu.tw/publications

Tools for 3D rendering

It's known that 3D rendering is computation expensive.
And I want to use Apache Hadoop for distributed 3D rendering (rendering images or videos) to reduce rendering time. So after learning about Hadoop, I understand that I need 2 things:
Data, which will be visualized (probably it some kind of file, which contains instructions (like draw rectangle, set coordinates, set color etc.))
Some Tool/Program/Utility to render file described above. I want to invoke it from my program, pointing it to file with data. (it's good if this program has a command line API).
But I don't know anything about 3D rendering, so I need your help in suggesting tools (open-source) for render 3D images/videos. Also I don't know anything about input data. So it will be nice if you suggest me render tool + file format to render.
I heard about using Hadoop with .rib file format as data to visualize, and rndr program to render this data. So I need some analogue.
Please note, my goal is to more deeper learn about Hadoop and distributed computation, not about 3D rendering, so please suggest me simplest solution.
Thanks.
KISS: Gnuplot
If you really only care about using Hadoop, and your only requirement of the rendering is that it takes an input file and makes an image so you can show a completed animation, then I would suggest gnuplot. It is actually a graph-drawing program, but it takes scripts and produces image files, and most usefully for you you can enter mathematical formulae to draw rather than constructing 3d worlds to render.
You would simply prepare n files which are all the same except for an offset value for the time since start, and gnuplot would produce the appropriate frame.
This is the simplest option, and lets you concentrate on the Hadoop side. To show you how simple, this would produce a frame for an animation of a 3-blade fan spinning:
set xrange[-1:1]
set yrange[-1:1]
set polar
unset key
unset border
unset tics
set terminal png size 1000,1000
set output "frame_$FRAME.png"
plot cos(3*t+$FRAME/5)
A great thing about Gnuplot is that you type in commands in an interactive prompt to manipulate the graph, and these are the same commands you put in the script. So once you have something you're happy with, you can either do save 'newscript.gpt' or copy out the commands you used. You can recreate the graph by just running gnuplot newscript.gpt at a prompt.
Incidentally, it is easier to simulate hard-to-render scenes than to actually construct them, so just put a sleep command in the gnuplot script to make it take 15 seconds or however long.
The whole banana: Blender
Blender is a 3d rendering system. I believe it is used as a rendering system for some mainstream animations on server farms in exactly the manner you describe. It has quite a learning curve, but I think you should be able to pick up a tutorial or other pre-existing animation project files. From there you would need to work out how to invoke the rendering engine as a command for a specific frame. I've only ever done static rendering in blender, so I can't take you further there. This would be more impressive visually, but no more impressive academically, and you'll waste more time on that side of things.
My choice
Personally I would go with gnuplot. You can make 3d plots with the splot command rather than the 2d plot, and although it's not 3d scene rendering as you might be imagining, it achieves the purpose of making a picture using a script. You can begin with something totally basic like the above until you have your setup going, then introduce more complexity; from an implementation perspective, running a gnuplot script is easier than running a script that also requires a data file, but it's still easy to pre-generate the data and have gnuplot read that when you want to do command + script + data instead of command + script. The key is incrementally increasing the difficulty, not running before you can walk.
If you ultimately find you have spare time at the end and change it to using blender, then that's all free win, and you haven't jeopardised your hadoop project making it pretty.

Creation of GLCM texture images using MATLAB

I am quite new to image processing and I have question concerning the use of a MATLAB function like a filter (graycoprops).
In the problem occurring is that I want to process the image using this function (graycoprops). To be able to do this I need first to create the GLCM (graycomatrix).
To do this for the whole image is easy but how can I do it for a small region (e.g. 3x3) like a filter.
I was thinking something like colfilt could work but I no idea how can I take each time the block values and feed them to the graycomatrix and graycoprops.
Any help would be much appreciated as I am many hours stack!!!
GLCM Code
You might be interested in the code I have on GitHub for GLCM with sliding windows. It'll allow a lot of customizations and you can manipulate the windows size.

extract or analyse visual information from an image

i'm just curious if someone knows how to analyse an image. for example:
i have a heatmap picture, know i want to extract the color value and the x,y coordiantes and redraw the image with javascript & canvas.
Another example would be to recognize pattern in the image (lines, arrows) and extract the direction and length.
A popular image/video analysis library I would recommend is OpenCV. I have used this github fork of the ruby-opencv gem with success. If you scroll down on the readme file, you'll see an example on face detection. The unit tests demonstrate how to do other things like drawing shapes and such. At a glance, I don't see any tests on extracting pixel data, but it most definitely is possible.
If you need something more simple, you can try out devil. It's more user-friendly and is focused on image manipulation, but you can probably extract pixel data with it.
It sounds like you'll be leaning towards OpenCV. It might be useful to look at this previous question, specifically the mention of the Hough transform

Resources