Please complete this task as part of your GSoC 2018 application when applying for matching tasks/ideas.
This challenge is mandatory if you apply for T720, T763, T951 or T722T763.
---
The goal is to build a small application which decodes a buffer with raw image data from the AXIOM Beta and converts it using the [LodePNG library](http://lodev.org/lodepng/) to create a viewable PNG image.
# Create a simple C/C++ console application using the development environment of your choice1. Write a C/CPP program for loading a RAW12 image (link here) into the memory - separate the 4 channels (in memory - 8 bits). Output the intensity values of the first 5x5 (square tile) R, G, G, B channels.
2. Save the channels (separately) as valid image files (8 bits per pixel) named appropriately without use of any external libraries (e.g. openJPG/lodePNG). (Hint: PPM file format).
# Add lodepng.c/cpp and lodepng.h from the [LodePNG website](http://lodev.org/lodepng/) to your project / Makefile / whatever you use
# Read image data from a RAW12 file (sample file: [portrait-gainx2-offset2047-20ms-02.raw12](http://files.apertus.org/AXIOM-Beta/snapshots/portraits/portrait-gainx2-offset2047-20ms-02.raw12),3. 4096x3072Debayer the CFA data (in memory using nearest neighbour / bilinear) - output the image as a valid image file (8-bit, 12bit, color sensor with bayer colwithout use of any external library).
Additional task (for filter array)rame server project):
# Save one of the Bayer color channels (red, green1, green2 or blue) as a grayscale 8-bit PNG (2048x1536 Resolution) using the LodePNG library4. This PNG should be view-able/compatible Save the debayered RGB image as a BMP file format (with any image-viewer that can display PNG.out use of any external libraries)
Optional:Additional points (if you do one / some / all of the following):
1. Use cmake for building the C/CPP program
# Bonus points if your application runs on the [AXIOM Beta firmware in QEMU](https://github.com/apertus-open-source-cinema/axiom-beta-qemu).2. Abide by the C/CPP coding guidelines (link to be given here)
# Bonus points i3. If you use an existing debayering method to recover a color image.can load part of your program as a dynamic library (.so file)
**Collected information:**
- RAW12: https://wiki.apertus.org/index.php/RAW12
- Bayer Pattern: https://en.wikipedia.org/wiki/Bayer_filter
- 12bit conversion: https://stackoverflow.com/questions/33768206/convert-2-bytes-into-12-bit-number
- 12bit conversion (SIMD not required): https://stackoverflow.com/questions/15443868/fastest-way-to-convert-12bit-image-to-16bit-image
- [Processing RAW images in MATLAB](https://rcsumner.net/raw_guide/RAWguide.pdf) (useful as overview; we are not asking for color-correct output)
- Debayering: https://en.wikipedia.org/wiki/Demosaicing
**GSoC 2018 applicant code for review:**
**Note:** Using or improving upon existing code is permitted but, in the event that code authored by someone else is used, the code's original author must be credited.
- @TofuLynx: https://github.com/TofuLynx/apertus-CppChallenge
- @supragyaraj: https://github.com/supragya/PiNG12RAW
- @nmdis1999: https://github.com/nmdis1999/Apertus-Qualification-Challenge
- @pranabendra1997: https://github.com/pranabendra/T782--C-Cpp-Challenge
- @simon: https://github.com/Symon97x/GoogleSummerOfCode.git
- @pv.anirudh: https://github.com/AnirudhPuligandla/ApertusChallenge
To get in touch with any mentor check the [[ https://www.apertus.org/GSoC-2019-Mentor-Contact-List | Mentor Contact List]].