Merge branch 'main' of ssh://git.sixteenmillimeter.com/16mm/filmout_display
This commit is contained in:
commit
f8dc0a0283
15
README.md
15
README.md
|
@ -22,6 +22,21 @@ This application will take over the full screen when launched and display frames
|
|||
* [OpenCV](https://github.com/opencv/opencv)
|
||||
* [nlohmann/json](https://github.com/nlohmann/json)
|
||||
|
||||
### Submodules
|
||||
|
||||
To clone this project with the `nlohmann/json` submodule included:
|
||||
|
||||
```
|
||||
git clone --recursive https://git.sixteenmillimeter.com/16mm/filmout_display.git
|
||||
```
|
||||
|
||||
If you have already cloned this repo:
|
||||
|
||||
```bash
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
### Installing on Debian-based systems
|
||||
|
||||
```bash
|
||||
|
|
|
@ -6,7 +6,7 @@ Image::Image () {
|
|||
|
||||
Mat Image::getBlank () {
|
||||
if (blank.empty()) {
|
||||
blank = Mat::zeros(height, width, CV_8UC3);
|
||||
blank = Mat::zeros(Size(width, height), CV_8UC3);
|
||||
}
|
||||
return blank.clone();
|
||||
}
|
||||
|
@ -20,10 +20,12 @@ Mat Image::loadImage (string& image_path, uint64_t& x, uint64_t& y, uint64_t& w,
|
|||
if (loaded.empty()) {
|
||||
cerr << "{ \"error\" : \"" << image_path << " empty\" }" << endl;
|
||||
} else {
|
||||
resize(loaded, resized, Size(w, h));
|
||||
|
||||
cout << "{ \"loaded\" : \"" << image_path << "\", ";
|
||||
cout << "\"original\" : { \"w\" : " << loaded.cols << ", \"h\" : " << loaded.rows << " }, ";
|
||||
cout << "\"resized\" : { \"w\" : " << w << ", \"h\" : " << h << " } }" << endl;
|
||||
resize(loaded, resized, Size(h, w));
|
||||
cout << "\"resized\" : { \"w\" : " << resized.cols << ", \"h\" : " << resized.rows << " } }" << endl;
|
||||
|
||||
resized.copyTo(image(Rect(x, y, resized.cols, resized.rows)));
|
||||
flip(image, image, 0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue