So I'm not 100% sure if it's possible, but what I'd like to do is take a model that someone has created for a game, say in Blender or something similar, in various formats, and from that create an image to show on a website.
Are there any Java libraries around that could help me with that? Java3D maybe? Or even something in Flash? Ideally you'd be able to rotate the model in some embedded flash app, but I'd settle for a plain old image.
It depends on how far you want to go. Most models are going to be in a standard format- or can easily be converted to be - and most 3D Apis are able to load these formats in.
It would be a little unusual to do this on a server - you may even need to have OpenGL installed on it - but it should be quite easy to load a model in to a 3D environment and take a snapshot or a series of snapshots quite easily. Possibly even use these to create a short video clip of a complete turn around the model. If you're using Java take a look at some of the things people are working on over at http://www.javagaming.org/ - I don't know that Java3D is in use much still but there are other good 3D java environments around. JMonkeyEngine looked most interesting last time I was exploring that area.
Alternatively you probably can set up a way of loading the model into a clientside environment - I don't know if Flash can do 3D stuff now, but Shockwave certainly can ( although it's horrible to work with ) and I believe the Silverlight stuff likewise. Of course unless you are pregenerating your animations you are likely to be passing the model to your display logic on the client and a savvy user could intercept that, but the risk is probably reasonably low and from your question it's not clear whether that would be a problem to you.
Take a look into this post:
http://techblog.floorplanner.com/2010/01/25/introducing-asblender/
"Enter ASBlender, a library I slapped together in a few days to read Blender’s .blend file format and parse it to AS3."
lucky you! ;)
EDIT: added link for the project:
http://github.com/timknip/asblender
EDIT2: With the asblender library you can parse directly the .blend file (this is the working file, not a exported file format). Once you have the file inside the flash application you can use Papervision (I believe you do the same with other 3d libraries) to render the model, this way you can do a single image of the model or you can let user to see the model rotating. Beware that any of this libraries won't give the same render quality that a 3D application like blender is capable of. The good thing about this library is the capability of reading all the info in the scene, so you can match cameras and lights to be as close as possible to the original .blend file.
Alternatively there are also other parsers like Ase, Collada , DAE, KMZ, Max3DS, MD2, Sketchup, SketchupCollada... all of this inside papervision library.
Related
I am trying to make a GWT based web application which will be able to show 3D model from PTC Creo's .stp (STEP file). I am programming in Eclipse.
I started with Parallax3D framework, and I am able to make simple objects. But I'm stuck with how to parse the .stp file and make objects from that.
Later I saw that there is plenty of other tools for 3D on Web. There are "gwt-g3d", "gwtgl", "gwto3d",....
I also found JSDAI API, which should be able to parse .stp files. With very limited examples I couldn't manage to do anything usefull.
I am lost with all those things. Which path should I take?
Has anyone done that before OR is there a simpler opensource solution for that?
Thank you.
You could use the NIST STEP File Analyzer (free but not open source) to convert the STEP file to VRML/X3D. Three.js based frameworks can then view the VRML/X3D. If you want a completely open source solution, you need something to transform the STEP file, which often contains NURBS trimming that three.js lacks, to a tesselated form. FreeCAD, pythonOCC, node-occ or the underlying OpenCasCade can transform STEP to a mesh form.
I am currently developing a website in which several images will be displayed on a single page. In light of performance, I'm searching for the best way to handle thes images.
First, I will explain my needs. The back-end of the website consists of a CMS in which images can be uploaded (and maybe resized by the user so the image will have the neede ratio of width/height). These images will be displayed on several pages in de website, requested by (hopefully) many users.
Secondly, I will shortly describe my environment. I am developing in Java EE, using JSF as front-end. I am using multiple libraries like Prime Faces et cetera.
I have done some research and it seems there are dozens of solutions, but I don't know in which direction to search. E.g.:
Saving images in database
Saving images as static images by using for example filestreams
So in short:
Which way of saving and requesting images would be best in this case?
What library would you advice to serve me in this?
Is there a JSF-solution to manually resize images?
Would ImageJ be the best solution to generate thumbnails? If not, what would be?
If any other details are needed, I'm happy to provide them.
Thanks in advance.
I wouldn't worry about performance until it becomes an issue. I would perhaps worry more about auditability, maintainability etc.
In order to make a future change easy, however, is abstract away your image store such that you can easily replace (say) a file-based system, with a database system (or a cloud-storage solution, or, or...).
That way you can easily substitute one for another and compare/constrast if need be, or simple swap out your implementation at a later date.
So..
Saving images as files is best
After some research it seems that PrimeFaces offers ImageCropper
File Upload can be achieved using PrimeFaces' FileUpload
But still, I have seen many discussions on Image Manipulation by Java and the best tooling for this. Some say ImageJ would be great, others don't. Is there any reason why I should go with one or another?
So Here is the situation.
I have a video that contain some objects that moves (contract to be more accurate),
I'm trying to write a code to calculate these movements in matter of
Frequency of movements (how many contractions per minute)
How far does the contraction goes in mm.
How can this be done ?? :D!
I use Matlab now to to blot amplitude difference between each frame but its not giving very nice results so far.. (very buggy)
Any tips ? language i should use best, or is there already something exist that can compare different images and plot difference ?
Thanks
You should try Processing using one of these libraries.
Keywords to search for: Blob detection, Computer Vision
The best library for tracking moving objects is OpenCV, which can be used from within Processing, too. Tracking faces for example works like a charm there, but for more abstract shapes you should try another library like BlobDetection!
OpenCV is a great library if you plan to write into C/C++ (or wrapped into JavaCV if you prefer Java). Matlab is a great tool too, especially if you are working on a proof of concept you may want to work with something more friendly and "lighthearted" than C.
If you plan to measure positions or distances I suggest you to use some calibration toolbox to consider intrinsic/extrinsic parameters and eventually camera defects, it will give you more precise results. It is builtin into OpenCV, or take a look here if you plan to use Matlab.
so i'm not expert on this but if you want write something in php you probably would use gd library or imagemagick library also imagemagick utility on linux contains some comparing tool according this http://www.imagemagick.org/script/compare.php
I am a student and as a project i have to implement a barcode(1-D) based attendance marking system.While surfing across the web i came to know that barcode readers are a bit costly toys to purchase,so now what I want to do is I want to capture images of barcodes through a capturing device(mostly a webcam) and then process them to get the content stored in it.
I found a few projects on the internet that do the same but they use .NET f/w and I am not so familiar with .NET technology. The only project that uses java is http://sourceforge.net/projects/javabarcoderead/ but somehow i am not able to run the jar file they are providing.
SO, I would like to know about the algorithms or methods that can be used for the same or even any project from where i can get some insight on how to move further with this...
Happy Coding...
You're right, it would be very difficult to use a library with no documentation and no source code.
I'd suggest using ZXing. It's a well-documented library with lots of examples.
I am writing a web application that has a page that returns a list of results of objects that each have a profile photo.
I am unsure of how large I expect this page to get, but I want to account for it getting to a larger level. Right now, I am only returning 5-10 objects each with an associated photo, and I am seeing a performance decrease.
I am aware there are many resources on the internet regarding image optimization, and I have done some research, but am still lost as to what I should do to optimize this page.
I know that using css-sprites is an option, but these photos are added by members, so I'm not sure If I could keep up with updating the CSS Sprite.
I am also aware that some image types might be better for performance, but sometimes with a loss of compatibility(although I have read articles that argue against this, and say it is something of the past).
I am fairly new to the concept of needing to optimize images on my page, so if there is a more advanced technique that somebody believes might be over a more novice developers ability, then it might be the wrong thing for me.
Any advice would help. If I try one and am unable to figure out the answer, I can always try another.
I realize this is something that can go on StackOverFlow's sister website regarding web design, but I would like to get the server side of it as well because there may be some fixes I need to make when I am uploading the file, so please no comments on how this is not fit for StackOverflow, Thanks!
a good way of optimisng images is using cache, and plus thumbnail them!
if you dont know about caching:
this is good tutorial to start for
webdesigners/ devlopers:Cache Tutorial for web authors`
this is good tutorial on creating images into thumbnails using php and Gd(which comes default with php)
just check incase
Create thumbnails using PHP and GD`
Thumbnail them server-side to the EXACT dimensions needed, then convert them to a jpeg. Also, if possible, just use one "default" photo for all of the users then load the individual profile photos via AJAX once the page has loaded.