https://github.com/zywangzy/mosaic_cpp
Side project focused on computer vision.
https://github.com/zywangzy/mosaic_cpp
computer-vision image-processing
Last synced: about 1 year ago
JSON representation
Side project focused on computer vision.
- Host: GitHub
- URL: https://github.com/zywangzy/mosaic_cpp
- Owner: zywangzy
- Created: 2017-06-20T06:00:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T12:06:04.000Z (over 8 years ago)
- Last Synced: 2025-01-29T18:08:41.252Z (over 1 year ago)
- Topics: computer-vision, image-processing
- Language: C++
- Homepage:
- Size: 21.4 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mosaic_cpp
This project focuses on build a solution for getting an optimal image scratch replacing result. It segments the original image to numerous small chunks, and then replace each chunk with most similar image in a given library, thus to get a "Mosaic" effect.
Example:
Source image

Result image

Algorithm Pipeline:
1. Generate the color histogram features for all the library images and save them into local files.
2. Segment the source image into initial small chunks and merge them into larger chunks if possible.
3. Find the best-match image in library for each chunk in the source images based on color histogram similarity.
Progress:
1. Used PCA to reduce dimensions for color histogram features to reduce computation workload during finding best-match image for each chunk.
Next steps:
1. Use more efficient way to search for best-matching image.
2. Use markup language (e.g. .xml) files to configure the project.
3. Build API for Python or other script languages.
Personal note:
Use the following command to get the number of lines of code:
git log --author="wangzyusc" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -