Skip to content

CopyPasteFail/RGBit

Repository files navigation

RGBit

This app will show you the top 5 most common colors in a frame while seeing a preview

Table of content

How It Works

Configurs the camera to output JPEG, a background thread will convert it to Bitmap, and iterate over the pixels to count colors, using HashMap to count.

Installation

Clone this repository and import into Android Studio

git clone https://github.com/GipsyBeggar/RGBit.git

Performance

There are many improvements that can be done to improve performance, one option would probably be using YUV as output becuase it saves the time for compressing to JPEG.

In order to improve performance, a number of consts can be tweaked:

  • DEVIDOR - devidor for scaling down the surface (picture) size for better performance
  • MAX_IMAGES - more memory allocation for better performance
  • MIN_FPS = 5 - min FPS
  • MAX_FPS = 8 - max FPS of the camera, less FPS will improve performance

Maintainers

This project is mantained by:

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push your branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE.md file for details

Links

The following articles and documentations have been used:

Tutorials

Examples

Documentation

RGB values and frame data Q&A

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published