Image Processing


I don't feel like I'm having much luck with classes at the moment. I sat in on the maths lecture and we got back to matrices and matrix multiplication. I now know how to multiply 2 matrices, one will be 3x2 and the other 2x3, and we'll get a result that is 2x2... I really have no idea about the logic behind such a thing and what on earth the result is good for. How can you possibly apply the calculation of two matrices that don't line up and the result being a 3rd matrix that doesn't resemble either of the 2 multiples... to anything? So this is something I need to look into at some point...

Actually I do remember this from 4th or 5th form maths, it made little sense then too. Honestly, this is the problem with maths and the way it's taught in schools. It's never applied to anything and often makes no sense. Maths could be an interesting and engaging subject and people could learn and understand it, and want to do so. They could remember it. But not with the way it's commonly taught. I just don't understand why it has to be so problematic.

Small anecdote: Straight after I finished 7th form, I borrowed a book, the 1st year text on Psychology and I read it from cover to cover. In that book was a break down of basic statistics, the bell curve, 95th percentile as it was a key to understanding certain studies. It was so easy to grasp and I vaguely remember being taught the very same thing in maths 3 years earlier and not really making much sense of it. But a book on entirely different subject made it easily accessible. For a start it was because it was for a purpose. Maths classes generally don't give you a reason why you'd want to know something. The situation could be vastly improved if students were given small projects in which they had to discover they needed a certain math to get something done. Then told how to do it then they actually got to use it. Also if it was taught from a historical perspective, how did theorems get discovered or devised and why? What practical problems did they solve? But maths will continue to be a boring irrelevant subject until the day past students find they need to know something in order to do their computer science later in life or whatever, and at that point they will learn with great stress or fail or if they are lucky, discover one of the few resources that isn't awful. At which point I may as well suggest Khan Academy for anyone struggling with math.

We then moved back on to rotation calculations that we'd dropped off from 2 weeks ago. Once again I'd like to explore that further, now I know the formula. I want to understand it. Even if I am 20 years too late from needing to know how to translate a vector by hand. Next I'll find out how 3D space is translated onto a 2D plane. It's the kid in me, it fascinated me once.

We then had an explanation of how a matrix related to a bitmap image and image capture devices. I personally found it painful to listen to, with the urge to take over and explain the bits that always get left out. Things like just why maximum luminance is such an odd number like 256 (It was mentioned that it's because it's 2^8, but if I didn't know what I know I'd still be asking "So???"). I went home later on and worked on my Stopwatch.

Anyone in my class reading this (it's alright, no one does), short version is: computers use binary number system because it translates well to on and off, (decimal would mean 10 different voltages to represent 10 digits and that would be prone to errors). So base 2 number system (binary) means that every number to the left of the first digit is twice as powerful as the bit (binary-digit) to it's left as opposed to decimal where we have Ones, Tens, One-Hundreds etc. So it's Ones, Twos, Fours... 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024... numbers look familiar? Your usb stick is 8gb, 16gb or 32gb for example? Well there ya go there is the reason. So one byte is 8 bits, and converted to decimal = 256. Why is a byte 8 bits? Because years ago Intel produced it's first microprocessor and it could do calculation on 4 bits (later on with a hint of humour called a nibble) then it quickly released a machine that could do 8 bits which was a number that was starting to be usable for most common purposes: 8 bits (256) shades of grey... 256 steps of amplitude(volume) in a sampled wave form... The English alphabet, numerals, punctuation and a bunch of control codes fit into a byte (8 bits, 256 decimal) and it was called ASCII...

24-bit images are 3 bytes, and they contain one byte representing the luminance of Red, one byte of Green, one for Blue 3bytes = 16.8 million colours. 32-bit images have an extra byte representing the alpha channel which is how transparent a given pixel is.

Or it's CMYK is which is another colour space called a subtractive colour space and used for printing. Then there are High Dynamic range images that are 16-bits per pixel (2 bytes) so they are 48-bit images. While they take up twice the file size, 16 bits=65535 levels of luminance so much much higher fidelity colour, - very important if you are going to muck around with images in photoshop as do so usually results in dropping data from the image. 256 is low fidelity in audio too, and CD quality is 16 bits per sample... 44200 times a second - 44.2khz16-bit, - ever seen those numbers around CD discussion?

All this stuff is good to know in many ways, not least because this is a technical degree and not knowing this stuff might otherwise be considered laughable and someone not to be taken seriously. Understanding the basics gives you a grounding in the more complex stuff and can help you in ways that you don't know yet. Like any knowledge you can draw from it in ways you cannot imagine. Plus it's a bit weird to do colour correction in After Effects but not know this. I mean, really, how does one do that?

 

Right that felt better I think I filled in some of the missing bits...