160 likes | 170 Views
Behind the pixels. Zsolt Ocskai - Dennis Gabor College 21-04-2015. A few common things about raster images. Their data are stored in pixels The pixels contain channels Each channel contains 8 or 16 bits of information The number of channels is determined by the used colour space:
E N D
Behind the pixels Zsolt Ocskai - DennisGaborCollege 21-04-2015
A few common things about raster images • Their data are stored in pixels • The pixels contain channels • Each channel contains 8 or 16 bits of information • The number of channels is determined by the used colour space: • RGB – RED GREEN BLUE • CMYK – CYAN MAGENTA YELLOW BLACK • Palette – Indexed stored Colours (GIF) • Etc…
A few common things about the raster images R: 90 G: 84 B: 90 Photo by Rita Szabó
Shannonentropy for digital images If we assume pixels are independent from each other, then we fit to use Claude E. Shannon’s entropy formula to process a digital image. possible range of values for the Entropy: Where Where
Shannonentropy for digital images Images properties: JPG 24 bits/pixels RGB HEIGHT 1000 960 WIDTH 643 667 ENTROPY 15,0286 12,453 Photo by Rita Szabó Photo by Péter Vas
Differences between the image formats Images properties: FORMAT JPG TIFF 48 bits/pix. 24 bits/pix. RGB HEIGHT 10000 WIDTH 10000 ENTROPY 24,7204 14,8282
TAGGED IMAGE FILE FORMAT The TIFF is capable of: • Carryingmultipleimages • Storing1, 2, 3, 4, etcchannels/pixel • Storing1, 2, 3, 4, etc… bits/channel • Multipleoptionstoorderthechannels, bytes and bits • StoringLayers For 4 GB physicalstorageboundary
TIFF – amount of channels for 1 pixel RGB RGBA multispectral hyperspectral Capable of carrying more than 359 channels
The 2 main byte - channel orders for 3 pixels in 1 row Interleaved Per Channel I II III I II III I II III I II III
TIFF - head The TIFF is ownedbythe Adobe Inc. and it’sjustpartlyopenedformat. The navigation map forthedatastructurecan be foundintheTAGs. • AllTAGshaveuniqueaddress • SomeTAGsareforbiddentouse / writewithoutAdobe’sapproval Thereareseveralun-official TIFF formats • GEOTIFF • BIGTIFF
The entropy compute software for TIFF images • For the properly TIFF data reading we used the LibTIFF open source libraries • The libraries are available for C++ and .NET environments too and mostly work in the same way We created several applications for more efficient work With the programs we can: - determine the entropy for the whole image - determine the entropy for a single channel Images can be: - 8, 16 bits/channels - 1, 2, 3, 4, etc. Channels/pixel The programs are available for x64 systems: - Windows - Linux - OS X
The software I C++ console and Java GUI For Windows, Linux and OS X enviroments with LibTiff Visual Basic.NET Console and GUI For .NET framework with LibTiff.NET
The software II For JPG, PNG and BMP images C# for .NET 4.0 framework Variants for x86 and x64 systems For educational purpose
Some unusable results Test_8bit_grey.tiff Number of pixels: 2560000 Number of uniquecolours: 256 Entropyvalue : 8 White.tiff Number of pixels: 1000000 Number of uniquecolours: 1 Entropyvalue: 0 Test_24bit_rgb.tiff Number of pixels: 2560000 Number of uniquecolours: 256 Entropyvalue : 8 Black.tiff Number of pixels: 1000000 Number of uniquecolours: 1 Entropyvalue : 0
Where it has been used The researchproject • Educational Applications of Entropy and Fractal Structure Analysis in Impact Assessment of Environmental Pollutions (Journal of Applied Multimedia 2./VIII./2013) • Itwas an agricultural project toanalysethepossibilites of thepollutiondetectionsonimages. • The entropyshowed no significantresults • The SFD (SpectralFractalDimension) wascapable of detectingthedifferentpollutionsintheimages
Important links • „Digitális Fotósuli” - GDF Workshop • SFD Information Technology Ltd. - Digital Image processing web page • Adobe Systems Inc. - Offical TIFF web page • LibTiff project - TIFF handler packages for C++ (remotesensing.org) • LibTiff.NET project - TIFF handler packages for .NET Framework (Bit Miracle) • Research project – researchgate.net