Scatter plot of images using imshow() in matlab [closed] - image

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm trying to create a scatter plot in MATLAB where the samples are gray-scale images, like this one: http://isomap.stanford.edu/web2.jpg.
I'm able do it by first calling scatter function to create the plot, and then calling image(x,y,I) for each image, where x (y) is the range in x-axis (y-axis) where the image is to be plotted in the original plot.
The problem is that "image" does not produce a good visualization of the images, but "imshow" does. However, I didn't find any argument on this function that allows me to specify where to plot the image inside another plot. Any ideas?
Many thanks!

Related

How can I implement pinch/zoom event to my canvas? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've added a Canvas to my xaml page and drawn some squares on it. Now I want a event that allowes me to to zoom the canvas in and out, making the squares on it bigger and smaller.
I'm guessing I have to loop thru the children of the canvas and do the math magic on them, but how can I detect the user doing a zoom with two fingers? Does not seem to be anything built in?
Does anyone know about a tutorial?
You should check manipulations. They are the representation of multitouch input in .Net, such as zoom, rotation and so on. You will have to work with 3 events :
ManipulationStarted
ManipulationDelta
ManipulationCompleted (used for inertia)
With the ManipulationDelta, you will get a delta that you can use to transform your controls according to user's actions. Here is the MSDN Documentation
You will be interested by the DeltaManipulation.Scale property for your zoom.

Convert an animated 3D model to Quake 2's models [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm about to create an Augmented Reality application which requires to render 3d models with animation. What is the best way/plug-in or software to export a model to old quake (.md2) format?
I want to use popular modelling software like 3Ds MAX, Maya or Blender. I have search all over the internet but I only found some plug-ins which I had difficulty to work with.
Any commercial tool? I need a good support.
Hmmm... my favorite question.
It highly depends on what kind of animation you are willing to export.
3Ds Max
In 3Ds Max there is an awesome plugin called QTip. It only costs a few bucks but it's worth every single penny.
Maya
There is also another export plugin (MD2Export) for Maya. I didn't have much success with it but it's worth trying.
Blender
There are also some scripts written for Blender but none worked for me. But I think Blender 2.46 has a native export for MD2.
Stand-alone Software
Few lightweight applications have a support for export MD2:
fragMOTION: Can import/export variety of formats and has support for MD2 and MD3
MilkShape 3D: Same as fragMOTION but it also has an MD2 viewer which comes handy sometimes.
Quake2 Modeller: It's very old and I didn't try it personally.
NOTE 1: As I said, it highly depends on your animation. If you have Vertex animation then QTip is your golden choice. fragMOTION and MilkShape do not support vertex animation. But if you make Bone animation, you may use the modeling software of your choice and import it to fragMOTION or MilkShape and then export it to MD2.
NOTE 2: I think you can find more information about MD2 here

what is the best open source framework for programmatically producing .mov or .flv video files? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I would like to programmatically produce a simple animation video. Don't think "Toy Story" level of animation, think simple stick figures moving around the screen and other very simple lines and dots in black and white only. The point of the video is to explain a complicated scientific concept with a 5 minute video vs. pages and pages of text trying to describe images with words.
What is the best open source framework to make a .mov or .flv file that I can then upload to youtube or vimeo. I could use ImageMagick to write out jpeg after jpeg, and then ffmpeg to turn those jpegs into a .mov file. But is there a better framework out there for simple animation like this? I feel like the ImageMagick to ffmpeg route is going to involve a lot of me writing code from scratch to make a stick figure walk across the screen.
Traditionally people have used Adobe/Macromedia Flash for such problems. These days javascript and HTML5 canvas seem promising and popular.
There are plenty of Open Source Flash like IDEs if you want to go with that.
http://osflash.org/projects
If you want to have some fun I'd actually recommend Processing and going into the javascript direction.
http://processingjs.org/
https://github.com/fjenett/processing-video-js
or many other JS alternatives...
http://www.createjs.com/#!/EaselJS/demos
https://github.com/dkln/canvas_library/

What is the best algorithm for finding the closest color in an array to another color? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a color (RGB) being read from a sensor. I also have a list of "known" colors, each paired with a string name.
What would the best way (ie behave like a human choosing colors) to pull the name of the nearest color out of this list?
I've tried a shortest cartesian distance with RGB, but that makes grey closer to green than to black or white.
Rather than using RGB, try using an HSL (Hue, Saturation, Lightness) or HSV (Hue, Saturation and Value) color model. Then experiment with different elements of bias, e.g. hue being more important than luminance when you're calculating the distance.
Jon Skeet is right. You need to use a system with Hue as a component instead of RGB if you are concerned about the color component of the match differing too much. HSL or HSV will both work fine for this purpose.
Then you need to fiddle with the distance formula to weight up hue until you are happy with the results. Note that you will find the problem is actually essentially insoluble unless you have a large number of colors to match against or your input colors are confined to a small range of possible values. This is because although it might seem you can pin any color you want to one of 8 (red, orange yellow, green, blue, violet, black and white) or one of 16, in reality you'll find your algorithm will always find what seem to be obviously incorrect matches because with 3 axis of movement (hue, saturation, value or red, green, blue), there are a lot more "basic" colors than you might think at first glance.
I would think that if you treat colors as RGB coordinates in 3-space and compute distance from sampled to known values, you could determine the closest match. I probably would also try scaling R G B according to eye sensitivity (ie, Y = 0.3*R + 0.59*G + 0.11*B) you'd achieve the best result

Which would you prefer? SVG, HTML5 or regen'd-PNG for graphs & charts? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm developing a new site that graphs some operational metrics. As such about a dozen charts/graphs will be displayed on the site. I want to be able to have them dynamically scale down (within reason) based upon the size of the browser.
I'm debating the pros/cons of generating these as one of these options:
SVG. Great for scaling but may have limited support,
HTML5. Clearly a great choice for the future and for FF customers, IE?
PNG. This would
require that I regenerate the PNG
based upon the size of the DIV &c.
Which is the preferable option? I'm leaning towards PNG just for ubiquitous support, but would like to have client-side scaling. What is the best solution given the state of affairs of SVG and HTML5 canvas support in browsers?
I prefer SVG over HTML5 canvas or PNG for charts. Canvas and PNG zoom as bitmaps in Firefox. (Canvas provides a vector API, but it's a drawable bitmaps surface--not a vector store.) SVG zooms as vector graphics in Firefox.
I ofter run with the view zoomed, so I appreciate real vector zooming.
(Canvas makes sense for games that can't handle the perf hit of retained mode graphics.)
You could do worse than explore a new charting library:
http://g.raphaeljs.com/
You won't believe it at first.
Now you can use SVG anywhere
SVG is supported by all modern browsers.
Canvas is supported by all modern browser.
Internet Explorer supports neither.
A partial API for SVG, with fallback mechanism for IE exists in Raphaƫl (raphaeljs.com)
A partial Canvas-implementation for IE exists in ExCanvas
I'd say say its not a question of "Canvas or SVG", but what high-level library exists that best covers your needs.
The best option would be SVG or HTML5 that will fall back on PNG if the others aren't available.
ExplorerCanvas brings <canvas> support to IE. So, it would be an amalgamation of 1 & 2. The benefit would be that (a) as more browsers add support for <canvas>, you would automatically get the benefits of already supporting it and (b) you would get scaling with browser size.
You can use SVG with a png fallback just using CSS as it is described in this answer: https://stackoverflow.com/a/13575068/418711

Resources