{"id":13848102,"url":"https://github.com/thiagokimo/Alexei","last_synced_at":"2025-07-12T11:33:33.355Z","repository":{"id":19712721,"uuid":"22968159","full_name":"thiagokimo/Alexei","owner":"thiagokimo","description":"DEPRECATED - An Image Processing Interface for Android","archived":false,"fork":false,"pushed_at":"2015-09-10T17:33:07.000Z","size":5250,"stargazers_count":183,"open_issues_count":1,"forks_count":34,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-08-05T19:35:25.208Z","etag":null,"topics":["android","image-processing"],"latest_commit_sha":null,"homepage":"https://github.com/thiagokimo/Alexei","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiagokimo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-14T20:48:50.000Z","updated_at":"2023-07-12T10:47:50.000Z","dependencies_parsed_at":"2022-08-24T10:52:17.945Z","dependency_job_id":null,"html_url":"https://github.com/thiagokimo/Alexei","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagokimo%2FAlexei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagokimo%2FAlexei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagokimo%2FAlexei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagokimo%2FAlexei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiagokimo","download_url":"https://codeload.github.com/thiagokimo/Alexei/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225820303,"owners_count":17529138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","image-processing"],"created_at":"2024-08-04T19:00:41.402Z","updated_at":"2024-11-21T23:30:58.817Z","avatar_url":"https://github.com/thiagokimo.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Alexei\n\nA type-safe interface of image processing algorithms.\n\n## Screenshots\n![](https://github.com/thiagokimo/Alexei/blob/master/screenshots/dominant-color.png)\n![](https://github.com/thiagokimo/Alexei/blob/master/screenshots/blur.png)\n![](https://github.com/thiagokimo/Alexei/blob/master/screenshots/palette.png)\n\n# Demo\n\nThe sample application (the source is in the **app** folder) has been published on Google Play to facilitate the access:\n\n[![Get it on Google Play](http://www.android.com/images/brand/get_it_on_play_logo_small.png)](https://play.google.com/store/apps/details?id=com.kimo.examples.alexei)\n\n## Setup\n\nGradle:\n\n``` groovy\ndependencies {\n    compile 'com.github.thiagokimo:alexei-library:1.4'\n}\n```\n\nMaven:\n\n``` xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.thiagokimo\u003c/groupId\u003e\n    \u003cartifactId\u003ealexei-library\u003c/artifactId\u003e\n    \u003cversion\u003e1.4\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nThe basic API declaration is quite simple:\n\n``` java\nAlexei.with(context)\n      .analyze(image)\n      .perform(calculus)\n      .showMe(answer);\n```\n\nIt's like saying: *\"Alexei, analyze this image, perform some calculus\nand give me the answer!\"*\n\n### Example\n\n``` java\nAlexei.with(context)\n      .analyze(imageView)\n      .perform(ImageProcessingThing.DOMINANT_COLOR)\n      .showMe(new Answer\u003cColor\u003e(){\n        @Override\n        public void beforeExecution() {\n          // anything you want to define before the calculation\n        }\n\n        @Override\n        public void afterExecution(Color answer, long elapsedTime) {\n            // your usual things after the calculation\n        }\n\n        @Override\n        public void ifFails(Exception error) {\n          // when shit happens, do your stuff here!\n        }\n      });\n```\n\n### Internal Calculus\nAlexei has some predefined image processing calculus. Check them out:\n\n* [Dominant Color](https://github.com/thiagokimo/Alexei/blob/master/library/src/main/java/com/kimo/lib/alexei/calculus/DominantColorCalculus.java)\n* [Color Palette](https://github.com/thiagokimo/Alexei/blob/master/library/src/main/java/com/kimo/lib/alexei/calculus/ColorPaletteCalculus.java)\n* [Average RGB](https://github.com/thiagokimo/Alexei/blob/master/library/src/main/java/com/kimo/lib/alexei/calculus/AverageColorCalculus.java)\n* [Blur](https://github.com/thiagokimo/Alexei/blob/master/library/src/main/java/com/kimo/lib/alexei/calculus/BlurCalculus.java)\n* [Grey Scale Filter](https://github.com/thiagokimo/Alexei/blob/master/library/src/main/java/com/kimo/lib/alexei/calculus/GreyScaleCalculus.java)\n\n### Custom Calculus\n\nCreate a custom calculus and implement a method called **theCalculation**, returning\nthe object you expect to calculate. The Answer generic type must match your custom calculus generic type.\n\n``` java\n\nAlexei.with(context)\n        .analyze(image)\n        .perform(new Calculus\u003cYourObject\u003e() {\n            @Override\n            protected YourObject theCalculation(Bitmap image) {\n\n                // do your bizarre stuff here!\n\n                return new YourObject();\n            }\n        })\n        .showMe(new Answer\u003cYourObject\u003e() {\n            @Override\n            public void beforeExecution() {}\n\n            @Override\n            public void afterExecution(YourObject answer, long elapsedTime) {}\n\n            @Override\n            public void ifFails(Exception error) {}\n        });\n\n```\n\n### Custom Executor\nIt is also possible to let Alexei perform its calculus in a custom Executor.\n\n``` java\n\nAlexei\n    .with(context)\n    .analyze(image)\n    .perform(calculus)\n    .withExecutor(YOUR_CUSTOM_EXECUTOR_HERE)\n    .showMe(answer);\n\n```\n\n## Contribuiting\n\nTo suggest a new feature/bug-fix:\n\n1. Fork it\n2. Create your feature/bug-fix branch(`git checkout -b my-new-feature-or-fix`)\n3. Commit your changes (`git commit -am 'Add some feature/fix'`)\n4. Do your pull-request\n\nTo add a new predefined calculus:\n\n1. Fork it\n2. Create your feature/bug-fix branch(`git checkout -b my-new-feature-or-fix`)\n3. Create your calculus inside `calculus` package.\n4. Create a fragment in the demo app with the new calculations being applied in an image.\n5. Do your pull-request.\n\n### THE IMAGES OF THE DEMO APP MUST BE HOT BLOND GIRLS.\n\n\n## TODO\n* Feed Alexei with more predefined calculus.\n\n\n## Who the fu#% is Alexei?\n[Alexei](http://buscatextual.cnpq.br/buscatextual/visualizacv.do?metodo=apresentar\u0026id=K4784376J9)\nwas one of my favorite professors in college. He's well known for its studies in\n **Image Processing** and **Computer Vision** fields.\nIt was almost impossible to not think in his class while I was writting this library :P\n\n## License\n\n    Copyright 2011, 2012 Thiago Rocha\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagokimo%2FAlexei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagokimo%2FAlexei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagokimo%2FAlexei/lists"}