My previous post was about how to setup and build FFMPEG libraries on Ubuntu the hard way. But by using that method, the header files would all be stored in a folder right next to the C file. But another way that I found to hard-install FFMPEG libraries into Ubuntu would be:
1. I copied these 3 files inside my usr/lib folder:
- libavcodec.a
- libavformat.a
- libavutil.a
2. I created a folder called ffmpeg on my desktop.
3. Then I copied all the files inside the libavcodec folder into the ffmpeg folder from [2]
4. Then I copied all the files inside the libavformat folder into the ffmpeg folder from [2]
5. Then I copied all the files inside the libavutil folder into the ffmpeg folder from [2]
6. I moved the whole ffmpeg folder into the usr/local/include folder.
6. In my C file, I can use #include <ffmpeg/libavcodec.h> and the same for libavformat.h and libavutil.h
7. I compiled the C file with the -lavformat -lavcodec -lavutil -lm -lz options and it did not give me errors.
But the exercise still has a Segmentation Fault... but at least I got it to compile and the jpeg image flashed briefly on the screen...! And then I found out that the problem was with the image I used. I downloaded another jpeg and it ran smoothly!
Thursday, February 4, 2010
Tuesday, February 2, 2010
Lab Exercise 2 - Using FFMPEG part 2
Here is part 2. Windows did not like FFMPEG. No matter how hard I compile it, the program will not run because of certain unidentified errors although it compiled nicely.
I setup Ubuntu on my Desktop PC and it had some problems with FFMPEG as well. However, after one whole day of trial and error and not counting the many days of research, I finally got it to compile on Ubuntu. I had trouble building the FFMPEG on Ubuntu but in the end I managed to compile the program without building it. How?
1. I made sure I had these 3 files inside my usr/lib folder:
- libavcodec.a
- libavformat.a
- libavutil.a
2. I created a folder called ffmpeg right next to my C file.
3. Then I copied all the files inside the libavcodec folder into the ffmpeg folder from [2]
4. Then I copied all the files inside the libavformat folder into the ffmpeg folder from [2]
5. Then I copied all the files inside the libavutil folder into the ffmpeg folder from [2]
6. In my C file, instead of #include <ffmpeg/libavcodec.h>, I used #include "ffmpeg/libavcodec.h" and the same for libavformat.h and libavutil.h
7. I compiled the C file with the -lavformat -lavcodec -lavutil -lm -lz options and it did not give me errors.
But the exercise still has a Segmentation Fault... but at least I got it to compile and the jpeg image flashed briefly on the screen...!
I setup Ubuntu on my Desktop PC and it had some problems with FFMPEG as well. However, after one whole day of trial and error and not counting the many days of research, I finally got it to compile on Ubuntu. I had trouble building the FFMPEG on Ubuntu but in the end I managed to compile the program without building it. How?
1. I made sure I had these 3 files inside my usr/lib folder:
- libavcodec.a
- libavformat.a
- libavutil.a
2. I created a folder called ffmpeg right next to my C file.
3. Then I copied all the files inside the libavcodec folder into the ffmpeg folder from [2]
4. Then I copied all the files inside the libavformat folder into the ffmpeg folder from [2]
5. Then I copied all the files inside the libavutil folder into the ffmpeg folder from [2]
6. In my C file, instead of #include <ffmpeg/libavcodec.h>, I used #include "ffmpeg/libavcodec.h" and the same for libavformat.h and libavutil.h
7. I compiled the C file with the -lavformat -lavcodec -lavutil -lm -lz options and it did not give me errors.
But the exercise still has a Segmentation Fault... but at least I got it to compile and the jpeg image flashed briefly on the screen...!
Friday, January 29, 2010
Color and Light Lingo
Lots of Lingo (Terms) related to color and light...
Luminance - the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle. In a nutshell: how bright something is
Hue - the wavelength of the light where the light energy is the most, therefore defining the color type. For example, if the energy is mostly at 180 wavelength, the light is aqua blue. 0=red and 300=pinkish.
Lightness - how white the color is. Let's say we have a color blue. If the lightness value is high, it becomes light blue and nearly white. In the middle, it is just pure blue and a low lightness value will make it very dark and nearly black. Values = 0 to 100
Brightness - formerly the same as luminance. But now, only used to describe physiological sensations and perceptions of light. In a nutshell:how bright or dark Values = 0 to 100
Colorfulness, Chroma and Saturation - Now this one is a pain. From wikipedia:
Colorfulness is the difference between a color against gray. (dullness, like the TV setting)
Chroma is the colorfulness relative to the brightness of another color which appears white under similar viewing conditions. (actually the same as colorfulness, just relative to something...)
Saturation is the colorfulness of a color relative to its own brightness.(actually the same as colorfulness, just relative to something...) Sometimes also referred to the purity of the color. Values= 0 to 100
Gamut - The subset of colors that can be displayed, usually different shades of red green and blue. Mostly depends on the device outputting the color.
Luminance - the amount of light that passes through or is emitted from a particular area, and falls within a given solid angle. In a nutshell: how bright something is
Hue - the wavelength of the light where the light energy is the most, therefore defining the color type. For example, if the energy is mostly at 180 wavelength, the light is aqua blue. 0=red and 300=pinkish.
Lightness - how white the color is. Let's say we have a color blue. If the lightness value is high, it becomes light blue and nearly white. In the middle, it is just pure blue and a low lightness value will make it very dark and nearly black. Values = 0 to 100
Brightness - formerly the same as luminance. But now, only used to describe physiological sensations and perceptions of light. In a nutshell:how bright or dark Values = 0 to 100
Colorfulness, Chroma and Saturation - Now this one is a pain. From wikipedia:
Colorfulness is the difference between a color against gray. (dullness, like the TV setting)
Chroma is the colorfulness relative to the brightness of another color which appears white under similar viewing conditions. (actually the same as colorfulness, just relative to something...)
Saturation is the colorfulness of a color relative to its own brightness.(actually the same as colorfulness, just relative to something...) Sometimes also referred to the purity of the color. Values= 0 to 100
Gamut - The subset of colors that can be displayed, usually different shades of red green and blue. Mostly depends on the device outputting the color.
Color and Human Visual System
What is Color?
When the brain receives data from the light that enters our eyes, due to the intensity of different types of lights. They differ in terms of the distribution of the light energy in the spectrum of light, and also the length of the wavelength. Red light has a longer wavelength compared to blue light.
Human Visual System (HVS)
Human eyes detect light using 2 types of receptors :
1.Rods - used to see when light is dim.
2.Cones - can absorb different wavelengths:
- long/red
- medium/green
- short/blue
Therefore, cones function to distinguish color.
When the light is moderately bright, both rods and cones work and this is mesopic vision.
When the brain receives data from the light that enters our eyes, due to the intensity of different types of lights. They differ in terms of the distribution of the light energy in the spectrum of light, and also the length of the wavelength. Red light has a longer wavelength compared to blue light.
Human Visual System (HVS)
Human eyes detect light using 2 types of receptors :
1.Rods - used to see when light is dim.
2.Cones - can absorb different wavelengths:
- long/red
- medium/green
- short/blue
Therefore, cones function to distinguish color.
When the light is moderately bright, both rods and cones work and this is mesopic vision.
Subscribe to:
Posts (Atom)