Mostrando postagens com marcador computation. Mostrar todas as postagens
Mostrando postagens com marcador computation. Mostrar todas as postagens

segunda-feira, 1 de julho de 2013

Android apps with OpenCV

Last week, I discovered a blog about Android apps developed based on OpenCV. The developer uses OpenCV to create new features in the Android device.

The link is: http://engcross.blogspot.com.br/ and his page in Google Play is https://play.google.com/store/apps/developer?id=Eng+Cross

There is following some screenshots presented in the page in Google Play.

App 4 View: applies 4 effects in your camera visualization, then you can select which you want, just touching on the screen, and take photos these are saved in SD card.


App Right Angle: transforms your Android device in a set-square tool, identifying right angles in the image captured from the camera, all you need to do is to put the mark over a 90° object, as a desk, table, draw, furniture, etc.


Other information, these two apps are free and without advertisement, so we can use them right now!

quinta-feira, 19 de março de 2009

Mathematical Morphology using OpenCV

I did a post about mathematical morphology, I wrote about theory of mathematical morphology.

Now, I want to write about the functions of OpenCV* for manipulate the structural element and apply the operations of erosion and dilatation.

The following function creates the structural element:

IplConvKernel* cvCreateStructuringElementEx( int cols,
int rows,
int anchor_x,
int anchor_y,
int shape,
int* values=NULL );

cols: Number of columns of the structural element

rows: Number of rows of the structural element

anchor_x: Horizontal offset relative to point of anchor, normally equal to 0 (zero)

anchor_y: Vertical offset relative to point of anchor, normally equal to 0 (zero)

shape: Type of structural element, possible values:
  • CV_SHAPE_RECT, square element;
  • CV_SHAPE_CROSS, element in disc;
  • CV_SHAPE_ELLIPSE, elliptic element;
  • CV_SHAPE_CUSTOM, element defined by user. In this case, the parameter values specifies the mask, delimiting the vicinity of the pixel in analysis.
values: Pointer to structural element defined by usuer, this parameter is used just for shape = CV_SHAPE_CUSTOM.

Function of erosion:

void cvErode( const CvArr* src, CvArr* dst,
IplConvKernel* element=NULL, int iterations=1 );

Function of dilatation:

void cvDilate( const CvArr* src, CvArr* dst,
IplConvKernel* element=NULL, int iterations=1 );

src: Input image;
dst: Output image;
element: Structural element. If it's NULL, the structural element is a square 3x3;
iterations: Number of times for apply the operation.
The interfaces for development in Python is the same, and all functions are very fast because they're implemented in C.

More informations here.


----------------------
* OpenCV (Open Computational Vision) is a API for development using Computational Vision. It's a very powerful set of functions for capture, processing and showing of images and videos.

quinta-feira, 5 de fevereiro de 2009

Neural learning

Let's talk about neural computation.

The algorithms of neural computation are based in observations of nature, specially in animal's nervous system.

I did a post (here - in Portuguese) about neural networks, I wrote about concepts for who wants develop the algorithms.

The neural algorithms are able to assimilate the information by itself, like us.

The computers hold the information in digital memory and access the information by memory addresses, if we need an information then we send the address and get the content. In neural systems, if we need an information then we send a correlated information.

Let's think. You can't enumerate your neurons and access the information one by one. But you can access the information in your brain using other information correlated to it, for example: dog. You thought in a dog conforms to the standards you know.

Other example:
You look the image and you think the words garden, flowers, plants and the emotions like peace, tranquility, etc...

To finish, remember that God created the perfect nature, we can contemplate the nature and seek inspiration in God's creations.

quinta-feira, 15 de janeiro de 2009

Blog about Scilab

I created a new blog just about Scilab.

I want to teach how to use the Scilab for English speakers.

I'll post codes and tips for developing in Scilab and Scicos.

I want to teach something about digital images and signals processing in the new blog, but I'd like receive comments and interactions (votes in polls, for example) in the blog.

If I receive comments and suggestions, then I'll do posts as you want.

So, it's all! Visit me here, too.

sábado, 20 de dezembro de 2008

Lighting manipulation by histogram

I did a post about segmentation (in portuguese), in that post I cited a histogram's equalization, and, I'm working with enhancement for my DIP class, so I will show a very simple technique here.

I use just Scilab and SIVP for develop my codes (search for scilab and sivp tags here in the blog).

Ok, let's do a offset manipulation in the image's histogram. This technique consists in add or subtract a constant value in all pixels.

See the picture.

Its histogram is this.

Ps.: The histogram is the number of pixels for each value (send comments for any question).

This is a lighter image, and its histogram is concentrate in higher values. Thus, let's subtract a constant value 50 of each pixel.

The result.
Old imagem | New image.

And the hew histogram.

The technique is very simple, but the simplest form is the best in many cases.

If anyone wants more about histogram's manipulation then send me comments.

sábado, 8 de novembro de 2008

Fuzzy Logic

The fuzzy logic is a generalization of classic sets theory.

In the classic sets theory, a element is in a set or not.

For example, the fruit's universe, the orange is in set of citric fruits, and the apple is not in that set.

But, if we analyze the people's universe and make 2 sets: rich people and poor people. If anyone has more than US$ 500,000.00, that's rich, if anyone has less than US$ 500,000.00, that's poor.

Thus, someone has US$10,000.00; US$30,000.00; US$50,000.00; US$70,000.00; US$100,000.00; US$120,000.00; US$180,000.00; US$210,000.00; US$220,000.00; US$300,000.00; US$450,000.00; US$480,000.00; US$492,000.00; US$497,000.00; US$499,800.00; US$499,930.00; US$499,981.00; US$499,996.00; US$499,999.20; US$499,999.98; that's a poor people. And other someone has US$1,000,000.00; US$980,000.00; US$840,000.00; US$770,000.00; US$680,000.00; US$610,000.00; US$590,000.00; US$540,000.00; US$510,000.00; US$508,000.00; US$502,000.00; US$501,000.00; US$500,100.00; US$500,010.00; US$500,001.00; US$500,000.10; that's a rich people.

But, let's think: if anyone has US$499,999.97 and other one has US$500,000.01 they have the same money, because US$0.04 is almost no money, but they aren't in same set.

The fuzzy logic add the pertinence concept for each element. So, all elements are in all sets, but each element has a specific pertinence in each set.

We can use fuzzy logic in any situation, solving it as a linguistic problem. If you need classify the cars in big or small, is possible do 2 fuzzy sets, if you need classify the cars in big, small and median, is possible do 3 fuzzy sets, and successively.

I did the following video of a application that I developed for A.I. class.



Any question, you can comment the post.

domingo, 2 de novembro de 2008

Vowels in Sign Language

I recorded some videos more to my mastering qualify (the alphabet in Libras - Brazilian Sign Language).

I'm having problems with the Scilab (it doesn't read the videos), thus I used the mplayer to extract the frames. For extract frames from a video, I use the command:

>> mplayer -vo jpeg name_of_the_file.avi

Now, I'm doing tests about skin segmentation. I tried threshold and clustering algorithms, but nothing works with all pictures that I have.
If anyone can helps me, I will be very grateful.

These are some pictures that I have:

Letter 'A':

Letter 'E':

Letter 'I':

Letter 'O':

Letter 'U':

terça-feira, 21 de outubro de 2008

Feed

I maked this post for report to the reader that don't have many free time.

The Feeds (here is a text about it - in portuguese) enable that the reader knows the posts without visits the blog/site.

The RSS is the principle of feeds's operation. All's blogs have (or should have) it RSS available.

To acess the RSS content consists in add the RSS adress in a RSS reader, it can be on-line (for example My Yahoo!, Google, others blogs/sites) or locals (Akregator, for example).

For finish, these are MultiSign's adresses for some services:

terça-feira, 14 de outubro de 2008

Image processing in batch

I don't have very free time (because I'm doing my mastering qualify), thus this post will be small.

I want show the Phatch.

It's a software for image processing in batch. I don't know how that works, but I believe that it makes the same processing for all images (in a sequence).

Some examples of operations in the Phatch:
  • Resize;
  • Water mark;
  • Smoothing of boundaries;
  • Rotate.

The Phatch has more complex operations, but I don't use it yet, so I cann't talk about them.

quarta-feira, 1 de outubro de 2008

Control the ball with your hands - Game

Using the segmentation of hands, I developed the game Control the ball with your hands.

This a video for show the game:



This game was developed in the Scilab, using the SIVP toolbox, thus it's a simulation algorithm.

I develop games like this because I like it.

If anyone wants talk about this game, or others things, may send me e-mails.

terça-feira, 30 de setembro de 2008

Neural Segmentation of Hands

I developed an algorithm for segmentation of objects in digital images.

I maked this algorithm because I will need do segmentation of hand in my mastering project.

This a video whose I do for show the result.



The algorithm consists in build 2 clusters, the first for mapping the object and the second for mapping the ground.

I used Self-Organizing Maps for build the clusters.

I wrote the code in Scilab, using the SIVP toolbox.

terça-feira, 16 de setembro de 2008

GPIB - General Purpose Interface Bus

GPIB (General Purpose Interface Bus) is a communication interface between diferents devices, as USB, serial port, parallel port, etc....

The National Instrument$ and Angilent ($$$) support this interface (developing drivers and aplications), this is the first and problably the last post that I do about anything that use proprietary software, I want only show that is possible use free software in this type of situation.

So, the GPIB was developed by cientists, for your devices, and they earn rates about 5MB/s (yes, 5 Mega Bytes). Few time later the IEEE maked the standard IEEE-488.

This standard is very commom is devices of materials analysis, radio-frequency, etc.... those are used in "down engeneering".

But the Scilab has a toolbox for GPIB systems (here) and it works on GNU/Linux (if the toolbox doesn't work on GNU/Linux I don't make this post)!

About the GPIB:
  • Supports until 32 devices simultaneously;
  • In a GPIB network exists 3 types of elements: talkers, listeners and controllers;
  • Each device can be acessed and controlled individually.
For GNU/Linux developers, exists free libraries for GPIB developing to C/C++ and Python languages.

I'm having sucess with Scilab and GPIB.

Finishing: we don't need use MetLab or LambVIEW or any proprietary software (they smell badly!).

segunda-feira, 1 de setembro de 2008

GNOME Develop Enviroment

I installed the Ubuntu 8.04 on my laptop in last week and they (the laptop and the Ubuntu) are working very well together. I'm having only a problem: sound in headphones, but it's other thing.

I was searching for a IDE to GNOME, I want return to develop in C/C++ (when my teachers permit), and I found the Anjuta.

I'm not using it yet, but I found it simple and interesting. This is the start screen:

Selecting the option: New -> Project:

(The screen are in portuguese because I'm in Brazil)

See the 4 tabs: C, C++, Java and Python (providentially my favorite languages).

I liked the options of make GNOME, SDL and GTK applications, in C. I Would like develop some applications using OpenCV and OpenGL, together if possible.

Finishing, I want to present the Anjuta. I knew the KDevelop (of the KDE), but I'm working with GNOME now.

quinta-feira, 28 de agosto de 2008

Math Transforms

First, I would like ask to readers that you comment the posts, because I need know your preference about the issues.

Now, talking about math transforms, I want to "open the reader's eyes".

The idea over any math transform is see the information of other form, for example: the Fourier Transform enables a frequency analysis if the signal is in time, ou temporal analysis if the signal is in frequency.

The transformations can be linears, non-linears, inversibles, non-inversibles, unambiguous, etc....

The transformation y = A x is a linear transformation, where x is the input information, A is the matrix of transformation and y is the output information.

The Discrete Fourier Transform (DFT) can be calculated by: dft(x) = A x, where each element of A is a complex exponencial exp(w n). If the matrix A is inversible, the transformation y = A x is inversible.

Some transformations are very non-linear as Hough Transform, used in image processing, where the output is a vector that represents the suport straight of the most significant axis on the image. In this case, the transformation is non-inversible because many images have similars principal axis.

Closing the post: math transforms are functions that mapping a set in other set.

segunda-feira, 25 de agosto de 2008

Free Games

Games, or any entertainment aplication, ever are questioned in Free Software, because when someone is talking about GNU/Linux and others free systems other one be the question: "I will can play the game {X}??". So is necessary to cite the incompatibilities between the systems (GNU/Linux and Window$, for example). Sometimes the emulators (as the wine) can resolves the problem, but the games are a big problem to use free software, for domestic users.

Currently exists many free games, or compatible with free enviroments, that are very interesting, for example:

  • Nexuiz;
  • Super Tux (similar to Super Mario of SNES);
  • America's Army;
  • Open Arena;
  • Tremolous;
  • Tux Racer;
  • Alien Arena;
  • The Open Racing Car Simulator;
  • Frets On Fire;
  • Scorched 3D;
  • Mania Drive;
  • FreeCraft;
  • Cube.

List with many games here.

I believe that money is the biggest complicating for free game developers. But I find some answers to this question:

Publicity - a company can pay to the developers and the game could have advertisements of that, for example a car company (Ferrari, GM, Toyota, etc...) paid for a racer game, and all cars will be of this company.
"Closed" games - the game is free, so the source-code just together the program, but is possible to develop specific hardware to game and to market hardware and software together, or only the hardware, could be possible, too, make a portal with tutorials, tips, upgrades, device drivers, multiplayers games, etc...
Games to mobile devices (or embedded systems) - charge a fee by acess the site, download a program, upgrade, any resource, etc... And yet, the users could be tools to develop levels, for example.

Make money with free games is possible, invent your way!

Other big problem of game market is the developer's (programmers, game designers, graphic artists, etc....) greed, because many developers want be rich with only one game and live of this game forever.

Is better to do some games and make few many in each game than to do one game and make US$ 1,000,000.00 from it.

Today, most players can't pay for expensive games, but they can pay some cents for "simple" games.

Ok, it's all! Come on, let's to develop free games!!

domingo, 24 de agosto de 2008

Fourier Transform

The Fourier Transform of x(t), a continuos signal, enables the analysis in frequency of this signal.

The signal x(t) represents a value in each time instant, the signal X(jw), Fourier Transform of x(t), represents a value for each frequency, for example:

x(t) = cos(2t), X(jw) = 0.5 to w = 2 and w = -2, in this case x(t) has only frequency in 2 and -2 radians/s.

The Fourier Transform is defined by:

We observe the operation and see that X(jw) is obtain from a superposition of exp(-jwt) over x(t), for each w.

The Fourier Transform is a linear and biunivocal transform, so the Inverse Fourier Transform is:


Using the Fourier Transform is possible do analysis of any signal, as thermical, physical, electrical, electromagnetic spectrum, etc.....

segunda-feira, 18 de agosto de 2008

New Resource in the MultiSign

To the distracteds readers, I put many new resources in the MultiSign, some are only "flowers" but others are too interesting, for example the blog's access identifier.

Today I see the map, and it's here:



This resource counts the access (97 access since August, 13 2008) and locates the places that makes the access. In the map we see access from all Brazil's states, USA, Central America (maybe El Salvador), Europe (coutries about Spain, England and Germany), Swaziland (near to South Africa) and India.

The small points are places with less than 10 access and the bigger points are places with less than 100 access.

I would like to continue given the expectations and ask that to comment the post's.