mirror of
https://github.com/opencv/opencv.git
synced 2025-06-08 01:53:19 +08:00
changed image creation from handle
This commit is contained in:
parent
e8d2aad978
commit
2c63d2bd72
@ -82,10 +82,7 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vx_imagepatch_addressing_t addressing = Image::createAddressing(image);
|
ivxImage = Image::createFromHandle(context, color, Image::createAddressing(image), image.data);
|
||||||
const std::vector<vx_imagepatch_addressing_t> addrs(1, addressing);
|
|
||||||
const std::vector<void*> ptrs(1, image.data);
|
|
||||||
ivxImage = Image::createFromHandle(context, color, addrs, ptrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image ivxResult;
|
Image ivxResult;
|
||||||
@ -100,10 +97,8 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
|
|||||||
{
|
{
|
||||||
//create vx_image based on user data, no copying required
|
//create vx_image based on user data, no copying required
|
||||||
output = cv::Mat(height, width, CV_8U, cv::Scalar(0));
|
output = cv::Mat(height, width, CV_8U, cv::Scalar(0));
|
||||||
vx_imagepatch_addressing_t addressing = Image::createAddressing(output);
|
ivxResult = Image::createFromHandle(context, Image::matTypeToFormat(CV_8U),
|
||||||
const std::vector<vx_imagepatch_addressing_t> addrs(1, addressing);
|
Image::createAddressing(output), output.data);
|
||||||
const std::vector<void*> ptrs(1, output.data);
|
|
||||||
ivxResult = Image::createFromHandle(context, Image::matTypeToFormat(CV_8U), addrs, ptrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Graph graph = createProcessingGraph(ivxImage, ivxResult);
|
Graph graph = createProcessingGraph(ivxImage, ivxResult);
|
||||||
|
@ -91,10 +91,7 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vx_imagepatch_addressing_t addressing = Image::createAddressing(frame);
|
ivxImage = Image::createFromHandle(context, color, Image::createAddressing(frame), frame.data);
|
||||||
const std::vector<vx_imagepatch_addressing_t> addrs(1, addressing);
|
|
||||||
const std::vector<void*> ptrs(1, frame.data);
|
|
||||||
ivxImage = Image::createFromHandle(context, color, addrs, ptrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Image ivxResult;
|
Image ivxResult;
|
||||||
@ -109,10 +106,8 @@ int ovxDemo(std::string inputPath, UserMemoryMode mode)
|
|||||||
{
|
{
|
||||||
//create vx_image based on user data, no copying required
|
//create vx_image based on user data, no copying required
|
||||||
output = cv::Mat(height, width, CV_8U, cv::Scalar(0));
|
output = cv::Mat(height, width, CV_8U, cv::Scalar(0));
|
||||||
vx_imagepatch_addressing_t addressing = Image::createAddressing(output);
|
ivxResult = Image::createFromHandle(context, Image::matTypeToFormat(CV_8U),
|
||||||
const std::vector<vx_imagepatch_addressing_t> addrs(1, addressing);
|
Image::createAddressing(output), output.data);
|
||||||
const std::vector<void*> ptrs(1, output.data);
|
|
||||||
ivxResult = Image::createFromHandle(context, Image::matTypeToFormat(CV_8U), addrs, ptrs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Graph graph = createProcessingGraph(ivxImage, ivxResult);
|
Graph graph = createProcessingGraph(ivxImage, ivxResult);
|
||||||
|
Loading…
Reference in New Issue
Block a user