 |
|
 |
 |
A histogram is: a graphical display of tabulated frequencies. In our case, color frequencies that appear in an image. In some image manipulation software this can be named also as Levels. Statistically speaking, each level has the meaning of probability to appear in the image is a random pixel is chosen. A more practical approach would define each level as the number of pixels of that particular value per total number of pixels contained in the image.
The algorithm to calculate the histogram for an image is pretty straight forward if you know how to extract the RGB value of each pixel, by counting the number of pixels of each value (and then divide by the total number of pixels in order to get a normalized value). The script described next will output the histogram directly on the page, creating an HTML table which can be then viewed. Of course, this is one of the simplest solu ...
Posted by: Indy on October 30, 2006 at 09:37.
(17 comments)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
Although converting an image (usually in true color) to grayscale can sound like a simple operation if you are used to image processing software, PHP doesn't have a function for this conversion by default. Grayscale images
A grayscale image contains only various levels of gray in the image, which can be expressed mathematically by the red, green and blue values (expressed as RGB) all equal.
Still, true color images can have any value for r, g and b, so in order to convert this to a grayscale value a transformation is needed.
RGB and HSV
HSV stands for Hue, Saturation and Value. In order to represent an image in grayscale, all we need is to use the Value, with no Hue or Saturation. There are conversion equations from one to each other, so all we need to do is use them. ...
Posted by: Indy on October 30, 2006 at 02:51.
(10 comments)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
Images, even if they are big or small are usually full of colour. However, in certain situations you may want to check if an image is indeed grayscale or not. You can do this using PHP and its image manipulation functions.
How to extract RGB values from an image using PHP
RGB stands for Red, Green, and Blue - together forming a colorimetric system (color model) frequently used. Any color image can be represented in this system - the three channels can be used to manipulate the image in various ways.
However, in PHP, user doesn't have direct access to pixel values directly from memory and, most important, doesn't have access even to each channel separately by default.
In order to extract the RGB values, first we need each pixel value - for this, you can simply use the ImageColorAt() function, function bundled into the GD library.
Of course, in order to know the position of each pixel, one important thing to know is the image width and height. Thes ...
Posted by: Indy on October 28, 2006 at 08:15.
(2 comments)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
Mozilla Firefox is known for being much safer than other browsers, but sometimes you can get some strange error messages, in most cases because of incompatible extensions. Still, there is no need to despair, it is very easy to fix them. You can get this particular error message - Error launching browser window:no XBL binding for browser - after installing an extension or after you've updated to a newer version either the program or the extension.

In my case it was an incompatibility in Google Pagerank Status, but then again, this is just an example.
How to fix it
First, you need to open Firefox in Safe mode. If you didn't delete the links in the Start Menu when you installed it, you have a direct link to the Safe mode version there. But if you did, it's very easy to do it manually.
Just go to Start -> Run and in there type " ...
Posted by: Indy on September 16, 2006 at 03:07.
(11 comments)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
The initial distributed file was AOL-data.tgz (439MB). Inside it contains a simple readme file and 10 .gz archives, each containing a CSV collection. With a packed size of about 45MB each, when extracted they reveal the true treasure: a nice collection of actual user searches (each file at about 200MB). Although AOL removed the file from their website, it was spread to far too many people already and continues to distribute over the Web or through Torrent systems.
Create the MySQL database
I have only worked with the first file since it's a huge database and quite hard to extract some useful information even from a single file, but the operations are the same for each part. Why would you want to convert it to an actual database format? Well, if you know the power of SQL this question is very much answered by itself, if not, let's just say you can search, group and order data that you are looking for faster and easier than by other means. The first step would be to create the database structure:
...
Posted by: Indy on August 10, 2006 at 16:53.
(4 comments)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
If you are studying engineering or science, sooner or later, you will need to learn how to use Matlab, a programming language which allows easy manipulation of numerical data and implementation of algorithms. This tutorial will help you understand the basic syntax and data types used by the language.
MATLAB stands for "matrix laboratory" and both the programming language and the environment which implements it have this name. It was written in C and it is developed by the Mathworks company.
Most of the objects used in computations are, as it's name suggests, multi-dimensional matrixes. Any scalar value used is treated as a 1x1 matrix, vectors are treated as one dimensional matrixes, etc. Since all operations are optimized for matrix usage, you should get used to this style of programming if you plan on utilising Matlab extensively.
General use
In Matlab, you can enter commands on the command line or write full programs and run them. Entering a command followed by a semicolon will only execute the command, without printing the result. If it is not followed by a semicolon, the ...
Posted by: Quarc on August 10, 2006 at 08:14.
(1 comment)
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
|
 |
 |
Sometimes, Firefox crashes all the sudden even though you did not do anything out of the ordinary. In some cases this is caused by a bug in one of Yahoo! Messenger's files. Yahoo! Application State
Yahoo! Application State plugin is a component in Yahoo's web messenger that is supposed to watch your web browsers for changes made in your web mail to quickly respond on it. For example, if you receive a new email message and check your email by logging in manually the notice in the tray should disappear as well even if you don't click on it.
The problem is that although it does this job, it has a bogus behavior when browsing with Firefox. The plugin is active even if you don't have the messenger active. This is why it is advised that you simply remove it. This will NOT affect Yahoo! Messenger's functionality.
Get rid of npYState.dll
F ...
Posted by: Indy on May 22, 2006 at 15:07.
(8 comments)
|
 |
 |
|
 |
|
Random Article
How many times have you been annoyed by ads? How many times did you want to get rid of them at least for a bit? Well, now it's no longer a dream, it is as real as possible and only few clicks away. ...
Search
Feeds
All Categories
Articles
|