We can check your plugins and stuff
Showing posts with label Linux multimedia. Show all posts
Showing posts with label Linux multimedia. Show all posts

Tuesday, December 6, 2011

RAW vs JPEG file showdown

Well some times I get mails and questions like ....  keep hearing about something called RAW what is a Raw file ??? Should I use the RAW mode of my camera ??? RAW mode is slow why should I use it.. Jpeg or RAW which is the best and why ???

OK so here we go ...

What is a JPEG file:

Simple answer: A graphic file type that is almost universal and can be opened anywhere. Is small in size. Offers good to decent image quality.

Technical answer: The name "JPEG" stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and also other standards. The JPEG standard specifies the codec. A codec is a device or computer program capable of encoding or decoding a digital data stream or signal. The word codec is a portmanteau of "compressor-decompressor" or, more commonly, "coder-decoder".

Which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream. The compression method is usually lossy, meaning that some original image information is lost and cannot be restored, affecting image quality. There is an optional lossless mode defined in the JPEG standard; however, that mode is not widely supported in software products.

What does a JPEG file contain: 
  •     Color space definition
  •     Component sub-sampling registration
  •     Pixel aspect ratio definition.
What is RAW file:

Simple answer: A graphic file type that is different for each company or even camera model no. (e.g Canon .CRW and .CR2 files). RAW files are much bigger in size. Offers the best image quality. RAW files require special software to open and edit. A camera raw image file contains minimally processed data from the image sensor. Raw files are so named because they are not yet processed and therefore are not ready to be printed or edited. Normally, the image is processed by a raw converter software.

Technical answer: Raw image formats are intended to capture as closely as possible (i.e. at the best of the specific sensor's performance) the radiometric characteristics of the scene, that is, physical information about the light intensity and color of the scene. Most raw image file formats store information sensed according to the geometry of the sensor's individual photo-receptive elements sometimes called pixels rather than points in the expected final image: sensors with hexagonal element displacement, for example, record information for each of their hexagonally-displaced cells, which a decoding software will eventually transform into the rectangular geometry during "digital developing".

Raw image files are sometimes called digital negatives, as they fulfill the same role as negatives in film photography: that is, the negative is not directly usable as an image, but has all of the information needed to create an image. Likewise, the process of converting a raw image file into a viewable format is sometimes called developing a raw image, by analogy with the film development process used to convert photographic film into viewable prints. The selection of the final choice of image rendering is part of the process of white balancing and color grading. Like a photographic negative, a raw digital image have a wider dynamic range or color gamut than the eventual final image format, and it preserves most of the information of the captured image. The purpose of raw image formats is to save, with minimum loss of information, data obtained from the sensor, and the conditions surrounding the capturing of the image.

What does a RAW file contain:

  • A short file header which typically contains an indicator of the byte-ordering of the file, a file identifier and an offset into the main file data.
  • Camera sensor metadata which is required to interpret the sensor image data. This includes the size of the sensor, the attributes of the CFA and its color profile.
  • Image metadata which is required for inclusion in any CMS environment or database. These include the exposure settings, camera/scanner/lens model, date (and, optionally,place) of shoot/scan, authoring information and other. Some raw files contain a standardized metadata section with data in Exif format.
  • An image thumbnail. Optionally a reduced-size image in JPEG format, which can be used for a quick and less computing-intensive preview.
  • The sensor image data
Ok all this info is awesome and all but, too much info and computer tech doodle. Can you give me some simple easy to use information ;) ...Sure

JPEG versus RAW:
JPEGs are:
Faster to shoot
Faster to Save
Smaller in file size, consequently you can save many more panos/images on a drive.
Can be opened/edited in just about any graphics program
Cross-platform
Little or no learning curve
Anyone or almost any camera can shoot JPGs
8-bit files (only 256 color per channel)
Limited ability to color correct
Generally, you need to bracket in ONE f-stop increments.
Very limited in overall detail, but especially in highlight and shadow details
(in other words dark areas go black quickly and highlights go completely white quickly)
Better for shooting "journalistic" or fast moving/changing scenes, especially with people in them.

RAW files are:

Slower to shoot
Slower to save (More bits = bigger file size = more hard drive space needed = less images can be saved to a hard drive)
Larger in file size (14-bit RAWs are about 25% larger than 12-bit RAWs)
12-bit files have 4096 colors per channel and 14-bit files have 16,384!
Are "proprietary" per camera manufacturer and even within a single manufacturer
(i.e.: Canon) they have multiple RAW formats (i.e.: .CR2 and .CRW)
Much more exposure latitude, consequently fewer photos to cover a large exposure range.
(i.e. 3 RAW files can cover a range that 5 or 6 jpegs would be needed to cover)
This also means less bracketing!
Ability to change color temperature after its been shot.
Have to be "processed" in a digital darkroom (i.e.: Adobe Lightroom) and then saved as secondary file such as Tiff, JPG, EXR, etc.
Are Non-destructive! At this point, RAW files cannot be saved. Therefore you can always go back to the original and make additional corrections.
Are naturally a bit "soft" looking. RAW files are INTENDED to be sharpened, so some photographers have a hard time switching for that reason alone.

**Special note -- Cameras with a small sensor size like many Pro zoomers and Four-micro systems. Using ISO speeds of over 800 or more generally results in bad quality or lot of digital noise. Using a RAW file will always give you better results after De-nosing/noise removal than using a jpeg.

In terms of colors, what is the difference between 8-bit, 12-bit, 14-bit, and 16-bit files?
    • 8-bit files: 256 colors (shades of gray) per RGB channel
    • 12-bit files: 4,096 colors (shades of gray) per RGB channel
    • 14-bit files: 16,384 (shades of gray) per RGB channel
    • 16-bit files: 65,536 colors (shades of gray) per RGB channel

Cool so still why use RAW ??
In terms of practical application, having more bits per channel basically means more subtle/smoother color variations, more highlight, and more shadow details are
available.This simply means that you will have more rich and bright, vibrant colors = better looking photographs. Personally, I always try and shoot RAW. Once you go RAW, you never want to go back to the “old” way. (Assuming you know how to properly process them)

Nice how do I start with RAW files and what software is needed???

Set your camera to RAW mode. Start shooting. For basic simple level editing of RAW files use IrfanView free get it at http://www.irfanview.com/

For proper full "processed" RAW file in a digital darkroom use Adobe Lightroom or
Raw Therapee free get it at http://rawtherapee.com/

Then saved as secondary file such as Tiff, JPG, EXR, PNG.
I recommend using PNG over JPG much better quality and decent file size.

Why not use RAW files ??
You have a old and slow computer.
Full and proper RAW processing requires a fast computer with lots of RAM.
RAW files take a lot of space, so if you are running out of disk space it is better to use JPEG.
You mainly shoot to upload the photos online, best possible quality is not an absolute requirement.
You do not want to learn new software and do any type of digital processing.
Developing/Processing RAW files is a time consuming activity. Which may lead to excessive consumption of Coffee, jolt cola, red bull and other such energy drinks ;)
You are pressed for time, you just need basic edit, crop, save. Use jpeg
You are just plain lazy ;)

Disclaimer: Parts of this post were sourced from the Internet and placed here for easy and quick reference.

Friday, November 4, 2011

Some personal musing on Linux...

Have been using Computers since early 80's old fond memories of chunky, springy old BBC micro keyboards back at school as small kids... staring at the small burning phosphor orange or green screens... it was all 'awe' and 'awesomeness' .. LOGO and turtle :D :D fun times.

Till early 90's I did not even own a personal computer... by mid-late when I did get one it costed an arm and leg. Had no idea about "free software"... back in the days one friend had a fast PC with the Pentium Pro chip ... we got hold of a Slackware CD via a popular computer mag.. booted with it and borked the windows 95 boot loader... I had to literately had to take the slack ;) for that... It was good I knew how to re-install Windows.

We had no Internet and support to speak of... First there was shell/acc (which was too expensive) and the dial up modems. I recall few people had heard of Linux/GNU in our circles. I once subscriber to a national level mailing list... as my software modem (sm56) would not work under Linux...  I was overwhelmed by the huge 
volumes of emails in my inbox. Over 300 mails in 2 days.. It did not make any sense too.. (to be true mostly flame wars and ego trips). Had to unsubscribe in just four days.  

I was given the typical RTFM treatment, and asked to grind the soft modem type advise... being on dial-up and raking up huge phone bills... where I was paying by the seconds did not help.. need less to say I was put off .... 
After a few years I did try Mandrake Linux and that did work with my dial up. I had to actually mail the maintainer of sm56 kernel module maintenance. He was kind enough to write out step by step commands. I did a actual compile of a custom kernel and module.. all without  realizing the depth or importance  of it. All I remember is that it took like three hours and forever.....  on my PIII :P

For years I did not look at Linux as a full time indulgence... things moved on the tech sphere.. was lucky to have indirect access to high speed Internet access via VSAT and ISDN via few government and research facilities. Saw them using Unix and Linux full time, the bug was on :)

A Indian tech mag had a big role in my trying Linux properly. There was a lot of useful discussion and proactive help. I even ended up been one of the unofficial beta tester for the distro they rolled out in '04, '05 and '06. After this there was a on and off spell of Linux Distro hopping ... Had a good run with the Sarge DVD... Fedora Core series. By now had seen all sorts of holy wars and flame wars on every thing under the sun from to call it GNU or not, KDE vs Genome, rpm vs apt vs yum, Windows vs rest of the to Open source world, happening/not happening Desktop Linux.  I had ADSL by this time, bills were reasonable now. 

Linux became main stream, at least usable for semi techie people. Lots of info on the Internet in the form of How-to, guides, web sites, and even videos. Major changes in hardware and better compatibly made things easy. Like all things tech ... things are moving at a rapid pace...  In all this my major observation is that the end user should have access to decent Internet speed. If he/she is driven enough the support and proper info can be found to make Linux work. Today points such as games/office suits/XYZ software on Linux is often mute. It works and works well indeed.
Major changes in hardware and virtualization technology, better and easy desktop environment, great hardware support in the latest stable kernels also made it easy for non *nix users to try out Linux and use it.  Now you do not have to a OS guru to install Linux. Don't want to install it just give a Live CD a try... it almost a non issue.

Now we are seeing a new wave of support issues, many places still don't have xDSL/cable or fiber. Many  people are on slow connections like GPRS, dial up even today. Many have just begun to taste the fruits of 3G wireless Internet. From what I have seen is 3G can be great enabler and can even used at places that do not have land-lines/xdsl. In this way my friends in the western countries are way better off.
For them it is just a matter of minutes or less then an hour at the maximum to try a new release DVD. On the other end for many of us it is still no fun to wait and keep downloading a DVD of around 4GB after several days. 
For what I see it is not some magical feature or the next killer app that helps in major Linux adaption, but it is rather the available of cheap data plans and faster Internet connection. Better hardware support for wireless devices like 3G HSDPA USB modems, pain less support for "tethering" with mobile phones. The Internet is "THE" medium of all types of content delivery , be it the all elusive killer cloud app or Linux adoption for the masses.    

Tuesday, July 12, 2011

How to make HDR (High Dynamic Range) Images the quick and easy way

Often while surfing the Internet, Photo Blogs you come across some stunning landscape. You wish you could also capture photos like that. You do some digging around and come to know that the photo is of  HDR type (High Dynamic Range). You search the Internet for more info.. after few hours your head is full of so much technical jargon. You actually forget what you set out to do. 

It does not have to be this way. Today I will show you a step by step way to make your own HDR images. As always we will preffer to use Open Source tools and programs to do so. The program that we will use today is called Luminance HDR 2.0.2 It works under Windows, Linux and Mac OS.

http://qtpfsgui.sourceforge.net/?cat=5   To get the Source Code or Mac OS version

Download and install the version that fits the version of your O.S We will be using the Qt version on Fedora Linux, all the versions should look the same. Before we go on. Making good HDR images takes time and a lot of patience and experimentation. So enjoy and love the learning process. Now launch Luminance HDR 2.0.2 Click on New HDR Image. The HDR Creation Wizard will open.

Click on Next


Now Click on Load Image, you can choose Jpeg, PNG, GIF and even RAW files 
Select a file and choose Open.








Now change the EV value and Click Next.


Don't make any changes on this screen and Click Finish.


Now the Real experimentation begins, change the value of Mapping and see the change.





































Now Click on Tone Map HDR Image (this will save the HDR image to a LDR format like Jpeg). Tone Mapping uses complex math algo to give it the HDR look. At this stage we have to select the size of the Image. You can keep the original size and re-size it. The bigger the size more time and CPU power is needed to make the HDR.Play around with the Operator Drop Down menu. See how the samples are rendered. Click of any one and Use Save As.
















.  


A Sample HDR Image that I made.This was a quick how to on how to create a HDR image using one file (jpeg/Raw). Remember it's all about the experimentation. Good luck

Wednesday, February 2, 2011

Build MPlayer the right way and fast on Fedora

We all know Mplayer and love it for the amazing multimedia features it has...
But for a while it has not seen any updates. Today while looking around the web I found the latest RC build of Mplayer and gave it a spin and boy does it rock :D If you are anything like me and love to compile some code to get better results, this post is for you.


Do try the latest build of MPlayer ... it's not a new project/software but the new build rocks....
I got it working with very low cpu usage and good quality with the following tweaks...


Download the latest MPlayer 1.0 RC4  from here

ftp://ftp1.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2

Also download the latest source of Yasm as it is needed.
( you can always do a yum install yasm, but this will install ver 1.0.1 not the latest and greatest ver 1.1.0)


http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz

Uncompress the yasm source, use ark or the command line whatever does it for you.

extract and change to the dir..


now export the following


#export CFLAGS='-O3 -pipe -march=native -mtune=native'
#export CXXFLAGS='-O3 -pipe -march=native -mtune=native'

Note if you have a Core 2 Duo use 'core2' for better results.



#./configure
#make -j6
#make -j6 check

you should get
===================
All 41 tests passed
===================

#make install


Now extract mplayer-checkout-2011-02-01 and change to the dir.. 

#./configure  
(this will check out the latest svn build of ffmpeg first, you must have a working internet connection)




#make -j6
#make install

That's it enjoy much faster and better quality video playback on your Fedora Linux.