Coder Social home page Coder Social logo

kaleidoscope's Introduction

Imageloader

Simple program to load a JPEG file, manipulate the data (YUV I420), and store the result as a JPEG file.

  • Depends on libjpeg

  • A kaleidoscope effect is included in my_library

Kaleidoscope

Install libjpeg

  • On Debian run sudo apt-get install libjpeg-dev
  • On macOS run brew install libjpeg
  • On windows follow the instructions here

Running the program

Cd to project root and run: make

Then run: ./imageloader <input.jpg> <out.jpg>

Kaleidoscope video effect

The kaleidoscope function takes jpeg as an input, applies the kaleidoscope effect similar to how it is shown in this video and saves the result in a jpeg file. The effect as it is shown in the video has multiple processing stages such as: dimming the background, scaling down the image and then moving the pixels around to create the kaleidoscope effect.

Our kaleidoscope dims the pixels outside the kalidoscope rim and provides an option as to how many sectors the kaleidoscope may display.

I420 YUV pixel format is explained in this link. More visual explanation at the bottom of this wikipedia article.

Implementation notes

  • Had to include the following library in the libjpeg.h to avoid the error /usr/local/include/jpeglib.h:774:3: error: unknown type name 'size_t
#ifndef _STDIO_H_
#include <stdio.h>
#endif
  • The kaleidoscope effect is implemented in the function kaleidoscope that is declared my_library.h and defined in my_library.c. Further, some helper functions are used and are defined after the kaleidoscope function.

  • The the main triangle and the basic 6 o' clock triangle of the kaleidoscope that are used during 'shrink and rotate' are shown below.

Trigonometry

kaleidoscope's People

Contributors

itornaza avatar havardgraff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.