-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from fixstars/feature/opencv-explicit-linking
Feature/opencv explicit linking
- Loading branch information
Showing
25 changed files
with
3,093 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include <ion/ion.h> | ||
|
||
using namespace ion; | ||
|
||
int main(int argc, char *argv[]) { | ||
try { | ||
const int width = 640; | ||
const int height = 480; | ||
|
||
Builder b; | ||
b.set_target(Halide::get_target_from_environment()); | ||
b.with_bb_module("ion-bb"); | ||
|
||
Port in{"input", Halide::type_of<uint8_t>(), 3}; | ||
|
||
Node n; | ||
n = b.add("opencv_median_blur")(in); | ||
n = b.add("opencv_display")(n["output"]); | ||
|
||
Halide::Buffer<uint8_t> in_buf(3, width, height); | ||
for (int y=0; y<height; ++y) { | ||
for (int x=0; x<width; ++x) { | ||
in_buf(0, x, y) = y * width + x; | ||
in_buf(1, x, y) = y * width + x; | ||
in_buf(2, x, y) = y * width + x; | ||
} | ||
} | ||
|
||
Halide::Buffer<int32_t> r = Halide::Buffer<int32_t>::make_scalar(); | ||
|
||
PortMap pm; | ||
pm.set(in, in_buf); | ||
pm.set(n["output"], r); | ||
|
||
for (int i=0; i<1000; ++i) { | ||
b.run(pm); | ||
} | ||
|
||
} catch (const std::exception &e) { | ||
std::cerr << e.what() << std::endl; | ||
return -1; | ||
} catch (...) { | ||
return -1; | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.