Moving forward into my main goal, I am now concerned with model segmentation. In my first approach to this problem I used the fitting primitives mesh clustering algorithm proposed by Marco Attene in is paper "Hierarchical mesh segmentation based on fitting primitives". A result obtained from a model extracted from the ESB with a preliminary prototype is depicted below, different colors representing distinct segments.
"AFj's PhD" blog was created in 2004 to report on-line the PhD work of Alfredo Ferreira (Jr). After finishing his PhD in July 2009, the posting was suspended.
However, after several requests, the blog was reactivated in October 2010."AFj's PhD and after" blog will provide information on Alfredo Ferreira's work as a researcher in INESC-ID and his activities as a Assistant Professor at IST/TULisbon.
Monday, March 03, 2008
Friday, February 29, 2008
OFFtoVRLM v0.3 released
Since many 3D models (especially CAD models) are stored in the STL format, I decided to include in OFFtoVRML prototype the capability to read from this type of file. Thus, among some other functionalities, such as reading OFF segmented models, and a few solved bugs, version 0.3 reads files in STL ASCII format. Bellow is a view of the VRML produced from a model extracted from the PRECISE Engineering Shape Benchmark. Another useful new feature is the possibility of including the reference axis in the VRML file.
The current stable version of the prototype is available for download [ZIP 136KB].
The current stable version of the prototype is available for download [ZIP 136KB].
Wednesday, February 20, 2008
Computing the Cord and Angle Histogram
As a first step during the development of a prototype for computing descriptors for 3D shapes, I implemented the Cord and Angle Histogram (CAH) descriptor. Below are the results of the computation for the dog model I often use (m87 from the PSB). Additionally, you can see the corresponding VRML model showing the estimated cords.




Monday, February 18, 2008
OFFtoVRLM v0.2 released
After a couple of changes, this prototype is now able to generate VRML code with explicit edges and showing both vertex and face normal for models with a large number of triangles. For instance, the Stanford Bunny with 70K polygons is processed in less then ten seconds, generating a 16.5MB VRML file containing the mesh and showing its convex hull, bounding box and sphere, polygon edges and normals at faces and vertices. A larger file, the 345K polygons Armadillo, is processed in around fifty seconds, generating a 70MB VRML file.
For illustration purposes we processed the 'Dino' model from AIM@SHAPE shape repository. It has around 50K polygons and below I show a couple of snapshots of the resulting VRLM model, containing normals and explicit edges.
The current stable version of the prototype is available for download [ZIP 118KB].
For illustration purposes we processed the 'Dino' model from AIM@SHAPE shape repository. It has around 50K polygons and below I show a couple of snapshots of the resulting VRLM model, containing normals and explicit edges.
The current stable version of the prototype is available for download [ZIP 118KB].
Monday, February 11, 2008
Computation of vertex normals
Resuming the development of my OFF to VRML converter, I added one more feature: the computation of vertex normals. For this purpose I follow the method described in the Computer Graphics bible, Foley et.al "Computer Graphics: Principles and Practice in C" . In my approach I use the area of the adjacent polygons to determine the length of the normal vector.
Thursday, February 07, 2008
New version of QiQA prototype
After a few weeks of hard work, the core of the "Quick Quotation Assistant" (QiQA) prototype was redesigned from scratch. Although the interface remains unchanged (except for a minor detail on QiQA-Builder) the implementation of algorithms is now absolutely different. These are now independent from each other, whilst in the previous version all were implemented together,with several cross-dependencies and lots of unnecessary functionalities. The current version of the prototype and a small drawing collection are available at the QiQA software download page.
Wednesday, February 06, 2008
A long lasting bug was solved!
Since the beginning of the QiQA prototype development I have been battling with a weird problem. The application just ended unexpectedly while processing some drawings during database building. However, I never had the opportunity to study this problem properly. Instead I choose to skip the problematic drawings, flagging them as "nor processable".
Fortunately, thanks to recent improvements in the feature extraction algorithms, the drawing processing is much faster than before (at least ten times faster). Thus, I decided to focus on the above referred problem.
After identifying a drawing that triggers the above referred error, I patiently started to debug the code. After several boring hours of detailed analysis, I finally found the portion of the code that causes this damned error.
It was during the access to a list within the CALI code, developed by Manuel João da Fonseca. When the given index value is outside the valid bounds, this library simply calls the C++ "exit" function. And that's it. But why and when does this happen? During the computation of convex hull of the "CIScribble".
Indeed, it seems to be missing a test in the "while" sentence, which allows a variable with a unacceptably low value to be used as index to access a list. Therefore, for now the solution was just adding a test to the "while" test expression and voilá... it works fine.
Fortunately, thanks to recent improvements in the feature extraction algorithms, the drawing processing is much faster than before (at least ten times faster). Thus, I decided to focus on the above referred problem.
After identifying a drawing that triggers the above referred error, I patiently started to debug the code. After several boring hours of detailed analysis, I finally found the portion of the code that causes this damned error.
It was during the access to a list within the CALI code, developed by Manuel João da Fonseca. When the given index value is outside the valid bounds, this library simply calls the C++ "exit" function. And that's it. But why and when does this happen? During the computation of convex hull of the "CIScribble".
Indeed, it seems to be missing a test in the "while" sentence, which allows a variable with a unacceptably low value to be used as index to access a list. Therefore, for now the solution was just adding a test to the "while" test expression and voilá... it works fine.
Tuesday, February 05, 2008
Modular QiQA
The main problem with QiQA prototype was the time it took to process a collection. This was due to a unstructured design. Indeed, this prototype was built from my master thesis work, by simple adding functionalities. The result of this evolution was a complex program with lots of unnecessary code, used during the years for several purposes and never removed.
To improve its efficiency I redesigned the application from scratch, focusing now on modularity. Therefore, I produced a modular solution, based on a set of packages, shown below.
To improve its efficiency I redesigned the application from scratch, focusing now on modularity. Therefore, I produced a modular solution, based on a set of packages, shown below.
Monday, January 28, 2008
Fluviário de Mora
Yesterday, to take the most of my last weekend in Portugal before leaving to Genoa, I went with my wife and son to the Fluviário de Mora. An aquarium dedicated to wildlife of rivers, in a small town in rural countryside. It was somehow a disappointment, especially because we are used to the wonderful Oceanário de Lisboa with its huge 5.000 cubic meters main tank. Anyway, I took some nice pictures in the Fluviário.
Thursday, January 10, 2008
New documents available on web page
After a researcher from the City University of Hong Kong asked me for a couple of reports on 3D shape retrieval, I decided to publish them on my institutional web page. Therefore, it is now possible to download directly from there the two technical reports on 3D shape analysis and retrieval written within the DecorAR project. Additionally, I also published my PhD thesis proposal.
Wednesday, December 19, 2007
Two weeks in Genova
In the first two weeks of December, I've been in Genova (Italy) to attend the AIM@SHAPE final workshop and the 2nd International Conference on Semantics and digital Media Technologies (SAMT 2007). Besides I visited the Shape Modelling Group at CNR IMATI-Ge, were I'm planning to work for three months in the beginning of next year. The picture below was taken before the social event, in front of the hotel were the conference was held.
Monday, December 17, 2007
Coloring according to distance to barycenter
In the OFF to VRML converter, it is now possible to colorize the
mesh surface according to distances from the corresponding vertices to the object barycenter.
mesh surface according to distances from the corresponding vertices to the object barycenter.
Wednesday, December 12, 2007
Computing the 3D convex hull
As a new optional functionality of the OFF to VRML converter, I coded the extraction of the convex hull of a 3D shape based on the implementation of the incremental algorithm proposed by O'Rourke in "Computational Geometry in C". Despite the clear explanation of the algorithm and included code, it took me some time to adapt it to the data structure I am using. However, the expected result were achieved.


3D model and corresponding convex hull.
Labels:
3D Model,
conversion,
convex hull,
mesh,
OFF,
VRML
Tuesday, December 11, 2007
Identification of face normals in the VRML file
I just added one more feature to my OFF to VRML converter: the optional representation of mesh normal vectors in the resulting model. The length of these normals is directly proportional to the perimeter of corresponding polygon.
Monday, December 10, 2007
Showing mesh edges on VRML file
Following my work on the OFF to VRML converter, I added another functionality. Now is possible to construct a model whit explicit edges, as shown in picture below. In the meantime I also computed a bounding sphere for the shape.
Thursday, November 29, 2007
Creating VRML with point cloud
The new functionality was added to the OFF to VRML file converter I developed. Now it has an option to create, in the VRML file, a point cloud of the model instead of the traditional mesh. Below is an example of such output.
Wednesday, November 28, 2007
Converting OFF to VRML (and more)
I developed in C++ a small tool that converts 3D models stored in OFF files to VRML files. Besides this simple task, I add a couple of functionalities, such as computing the bounding box of the shape and coloring the vertices according to it's order in the vertex list (just for fun).
Labels:
3D Model,
bounding box,
conversion,
OFF,
tool,
VRML
Tuesday, November 27, 2007
It was just a 'void' !!!
When I compiled a small application I wrote in C++ in Release Mode, the resulting 'exe' file crashed unexpectedly. Indeed the same code compiled in Debug Mode works fine. Initially I thought that it must be due to some failures in variables initialization, but no. When coding, I am usually very careful with that details.
I spent the whole afternoon trying to solve the problem. After a while I had already located the problem. The error occurs when accessing a list. Then I just had to figure out what I did wrong and solve it. But this apparently simple task was indeed a hard challenge. Finally, when I discovered the problem I was astonished by how strange it was.
I am using a list of pointers to instances of a class I defined. However, when I created the class, it was like this:
class MyClass : public {
(...)
MyClass();
(...)
}
Here, the class constructor does not have any parameters. It works perfectly fine in Debug Mode but it generates an error in Release Mode when using a list of pointers to this class. The solution was simple. I just have to change the constructor as depicted below.
class MyClass : public {
(...)
MyClass(void);
(...)
}
Damn! So much time lost because of a simple 'void'. Damn!
I spent the whole afternoon trying to solve the problem. After a while I had already located the problem. The error occurs when accessing a list. Then I just had to figure out what I did wrong and solve it. But this apparently simple task was indeed a hard challenge. Finally, when I discovered the problem I was astonished by how strange it was.
I am using a list of pointers to instances of a class I defined. However, when I created the class, it was like this:
class MyClass : public {
(...)
MyClass();
(...)
}
Here, the class constructor does not have any parameters. It works perfectly fine in Debug Mode but it generates an error in Release Mode when using a list of pointers to this class. The solution was simple. I just have to change the constructor as depicted below.
class MyClass : public {
(...)
MyClass(void);
(...)
}
Damn! So much time lost because of a simple 'void'. Damn!
Tuesday, November 13, 2007
QiQA Demonstration Video
Last week we created a short video to be shown in the "3as Jornadas de Inovação", an exposition organized by ADI. In this video we illustrate the main features of Quick Quotation Assistant (QiQA), a prototype developed within workpackage WP 5.1: Part and Tool Design of the Eurotooling 21 project.
Monday, November 05, 2007
Compiling C++ on MS VS without IDE
Although many people ignore this functionality, it is possible to use the Microsoft Visual Studio .NET without opening the IDE. Indeed, many tasks can be made from the command line, thus providing a way to improve the scripting capabilities of this tool. For instance, to compile a project from the command line, only two steps are necessary:
- Set the environment variables (eventually they can be already set)
Run "VCvars32.bat" (in .NET2003) - Compile the project
Call $ DevEnv project_name /Build configuration_name
Subscribe to:
Posts (Atom)


















