Can Collada (dae) be used as content? - c#

Can the Collada (dae) file format be used for content, or is it strictly for reciprocity between 3D studios, etc? For example, I create a XNA game, could I create a loader and load it in for usage in my game? Would it be wise and legal to do this? Or can I only use it to transfer between Maya and 3D Max?

Collada is a perfectly acceptable format to use with XNA. Benjamin Nitschke has created an excellent tutorial on loading a Skinned Collada model with all of the necessary loader classes etc. on his website. The source code is at the end of the article along with some other useful links.

You can definitely use it as the main format for your game.
Many systems support directly loading COLLADA:
Second Life Mesh
Ogre
GLGE
three.js
and many more.
If you're using C#, there is a C# Collada library.

Related

How to handle large Images?

I want to create my own Google Map like this:
My problem is that I can't load and edit my large images.
My Images:
PNG / JPG
700 MiB
300000px x 300000px
My attempts:
ImageMagick
.NET C# / BitmapImages ...
C++ / OpenCV
general image classes in Java and Python
With which language / library I can edit these big images.
I help maintain libvips, an image processing library designed to work with very large images. It's free and works on Linux, Mac and Windows. You can use it from the command-line, C#, C/C++, Python, Ruby and others.
You can make your google maps tiles from the command-line like this:
vips dzsave hugefile.tif myoutputdir --layout google
Or from Python (for example) like this:
import pyvips
image = pyvips.Image.new_from_file("somehugefile.tif", access="sequential")
image.dzsave("filename/of/pyramid", layout="google")
And it'll scan your huge tiff image and generate all the tiles. It's fast, it needs little memory and it'll work on images of any size. I regularly make 200,000 x 200,000 deepzoom images from microscope slides using my small laptop.
There's a chapter in the libvips docs introducing dzsave and explaining how to use it.
This is not a full answer, but I need a little more space than a comment can give.
Take a look at the large image support section on the ImageMagick or the discussion board.
This answer mentions the VIPS package which might be helpful.
You might also consider posting in photography stackexchange, or even blender stackexchange - for example I saw this answer which mentions writing individual image tiles - also here, although that question is about rendering. Blender is not specifically for image processing and editing, but it's pretty amazing and flexible and has a very active and supportive community. You can use python within Blender as well.
You could also think of asking in gis stackexchange.
When you post in the other stackexchanges, take a look around first and make sure you write your question so that it does not look too off-topic for that site.
Good luck - it seems tiling is everywhere!

C# image recognition

I'm currently searching for a C# image recognition library.
What I want to do:
I want to write a function that scans an image and returns if another image is part of it. Or at least something that looks familiar in case that the angles of the two objects are different.
The link to a possible library and a short code example would be great!
Thank you in advance!
Since you didn't mention that you are only looking for free libraries, here are some paid ones:
MVTech HALCON
Cognex VisionPro
Both have demo versions and quite good .Net wrappers bundled to the SDK, and I think both have the functionality you need. In Halcon, you might want to try different matching algorightms (gray value based, descriptor based, etc.), while in VisionPro PatMax or PatQuick might suit your needs. But obviously you have to try which one is the best for your specific problem.
EmguCV (http://www.emgu.com/wiki/index.php/Main_Page) is a good .NET OpenCV wrapper. It has a bunch of sample projects bundled. Run samples and you will get the idea of what can be done and how.
The Accord.NET library is not actually an image recognition tool set, however it provides the base for what you are aiming for. It contains many Imaging classes required for building an image recognition system. Accord.NET is LGPL licensed, except for some parts of it (e.g. its FFmpeg wrapper project).

Visualisation of 3D DICOM Images in C#

I'm developing an application that displays DICOM Images and also does Multi Planar Reconstruction, that works just fine, now, I'm going into 3D now (Skin).
What would be the best alternative? I've read about VTK but I'm not pretty sure, is there some examples out there I can reference?
This is the open source code you need:
http://www.codeproject.com/Articles/466955/Medical-image-visualization-using-WPF
I think what you are looking for is this [leadtools] (http://www.leadtools.com/sdk/medical/dicom.htm)

Working with BitMaps (PNG files) in XNA, System.drawing not available

I am sorry that this is a little bit ambiguous. I am having an issue using System.Drawing in XNA; from my research it is not available to XNA (since its part of the windows.dll?)
I want to create a sprite sheet analyzer which automatically dissembles a sprite sheet into its proper segmentation, number of frames, etc. for later playback. For this I need to grab the actual PNG file and it would be nice to have something that already has the functionality for working with images. Is there a class in XNA which provides similar functionality as System.drawing?
You can use System.Drawing in conjuction with XNA with no problem -- you just have to add a reference to it in your XNA project. However, System.Drawing does not support loading of .pngs, while XNA does.
The usual way to load images in XNA is to first add them to your content project (usually when you create an XNA project there is always a corresponding content project created). Add the saved .png to your content project and give it a unique name. Then in your code, load the image as a Texture2D:
Texture2D myTexture = Content.Load<Texture2D>("my image name");
Note the use of Content which is a ContentManager object that can be referenced from the Game object you are currently using for your XNA game.
Check this out for more information.
I found the answer. I can actually obtain the color data from the texture2D, allowing me to disassemble an image for analysis without using any extra libraries outside of XNA
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2D/Texture_to_Colors.php

What vector graphics libraries are available in ActionScript and/or .NET...?

I'm looking to build a website that has a flash interface and allows visitors to upload vector art in a number of file formats such as SVG, EPS and AI.
I have two rather large problems...
1) I need to load the original vector art, probably convert it to FLV and display it in my flash application.
2) After the user potentially loads a number of images, adds some text, rotates or transforms some elements, I need to save the resulting composition into a vector art format that I can print.
I'm not much of an AS developer...my experience is mostly in .NET/C# & C++.
I'm looking for a good library or API that provides the functionality I will need to convert different image formats and save the results.
How much of this can be done using Flash / AS...? How much in C#...?
I've used the libspark svgParser before to generate mxml from an svg and the similar fxgParser to create animation from a vector file.
The svgParser should come handy, but also have a look at their svgEditor.
HTH

Categories