Get Informed out of Data

Full width home advertisement

Raspbian

DataScience

Post Page Advertisement [Top]

What, Why and How - The prerequisites of OpenCV and Object Detection

What, Why and How - The prerequisites of OpenCV and Object Detection
Before reading this, you got to be a fool!. Eventually you will end up being on a complete choas.

Here, we are going to get into a new mode of thinking, yes! Do Computers really work on software? For me, the answer is No!.

A software is a perspective of human mind making the hardware to look like something or hardware being projected as a useful.


Yes, that's why software's have language - a communication medium to express an opinion (perspective). A same software language can be viewed as different stuff all together. 

For Example : Facebook, Bank transactions, Github all work on same basic principle but explained on their perspective.

Generally 0's and 1's are the software as few dig into these chapter's but reality is a transistor - whose path will provide either 0 or 1.

The name "Transistor" here can be a hardware. Hence without hardware we can't see software(we can't measure). 

Two things we often forget, Without Hardware we can't exit also without hardware we can't communicate.

Hence, we are the Hardware and we establish a language (our perspective = Software) by which we provide information.

If we want to identify something, we will look into combinations and finally decide something as alien.

Hence, Science inside the data varies for every new perception supporting the everyone's cause.

Let's see What a computer detects:

Does computer transfer data: No, Computers recreates data with signals. Have you seen the DIP switch with RF transmitter/receiver. It provides signals to activate a particular combination. All these happens at the hardware level by using the signal.

Software is a Thought, Hardware is Human

The methods used to send signals in a partcular way will be described as software. Hence, Computer detects hardware combinations which is the actual data.

These data have been formatted in software's perspective to easily render in and out.for example: General Hard disk file storage method vs Hadoop File storage method.

The perspective of data inside computers(hardware) are binary format (0's and 1's). But, we use Arrays to make it look like several other format.

Always before the born of computers, we tend to make these software's in real world by using math. Historicaly Math being a software or a perspective to work real world object.

Math is used to convert raw data into informaton, as today - analytics becoming impactful career is not something new.

How we detect:
  
For detecting text, we just use various other formats to binary conversion in PC's. But, text is also being a signal from keyboard it is very much a old stuff.

we are trying to play with images to create information out the data. For which, the basics of picturing has several rules to convert it into a binary value.

Images as Arrays

An image is nothing but a standard Numpy array containing pixels of data points. More the number of pixels in an image, the better is its resolution. 

You can think of pixels to be tiny blocks of information arranged in the form of a 2 D grid, and the depth of a pixel refers to the color information present in it.

 In order to be processed by a computer, an image needs to be converted into a binary form. The color of an image can be calculated as follows:

Number of colors/ shades = 2^bpp where bpp represents bits per pixel.

Naturally, more the number of bits/pixels, more possible colors in the images. The following table shows the relationship more clearly.

Bits per pixelNumber of colors
1 bpp2 colors
2 bpp4 colors
3 bpp8 colors
4 bpp16 colors
5 bpp32 colors
6 bpp64 colors
7 bpp128 colors
8 bpp256 colors

Computers can easily adopt to text or binary data.

Binary Image

A binary image consists of 1 bit/pixel and so can have only two possible colors, i.e., black or white. Black is represented by the value 0 while 1 represents white.


 Grayscale image

A grayscale image consists of 8 bits per pixel. This means it can have 256 different shades where 0 pixels will represent black color while 255 denotes white.

Colored image

Colored images are represented as a combination of Red, Blue, and Green, and all the other colors can be achieved by mixing these primary colors in correct proportions.

A colored image also consists of 8 bits per pixel. As a result, 256 different shades of colors can be represented with 0 denoting black and 255 white.


can represent the above image in the form of a three-dimensional array.
The OpenCV requires working with arrays, 

We use Python, Numpy and matplotlib to work on images.

No comments:

Post a Comment

Bottom Ad [Post Page]