Fix the conflict

This commit is contained in:
kalman
2018-11-24 16:43:38 +08:00
264 changed files with 29737 additions and 970 deletions

View File

@@ -11,9 +11,15 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
<<<<<<< HEAD
#include "mynteye/context.h"
#include "mynteye/device.h"
#include "mynteye/logger.h"
=======
#include "mynteye/logger.h"
#include "mynteye/device/context.h"
#include "mynteye/device/device.h"
>>>>>>> origin/develop
MYNTEYE_USE_NAMESPACE

View File

@@ -14,15 +14,17 @@
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
<<<<<<< HEAD
#include "mynteye/api.h"
=======
// #include "mynteye/logger.h"
#include "mynteye/api/api.h"
>>>>>>> origin/develop
#include "util/cv_painter.h"
#include "util/pc_viewer.h"
#define WIN_FLAGS \
cv::WINDOW_AUTOSIZE | cv::WINDOW_KEEPRATIO | cv::WINDOW_GUI_NORMAL
namespace {
class DepthRegion {
@@ -36,7 +38,7 @@ class DepthRegion {
* 鼠标事件:默认不选中区域,随鼠标移动而显示。单击后,则会选中区域来显示。你可以再单击已选中区域或双击未选中区域,取消选中。
*/
void OnMouse(const int &event, const int &x, const int &y, const int &flags) {
UNUSED(flags)
MYNTEYE_UNUSED(flags)
if (event != CV_EVENT_MOUSEMOVE && event != CV_EVENT_LBUTTONDOWN) {
return;
}
@@ -161,14 +163,14 @@ int main(int argc, char *argv[]) {
api->Start(Source::VIDEO_STREAMING);
cv::namedWindow("frame", WIN_FLAGS);
cv::namedWindow("depth", WIN_FLAGS);
cv::namedWindow("region", WIN_FLAGS);
cv::namedWindow("frame");
cv::namedWindow("depth");
cv::namedWindow("region");
DepthRegion depth_region(3);
auto depth_info = [](
const cv::Mat &depth, const cv::Point &point, const std::uint32_t &n) {
UNUSED(depth)
MYNTEYE_UNUSED(depth)
std::ostringstream os;
os << "depth pos: [" << point.y << ", " << point.x << "]"
<< "±" << n << ", unit: mm";
@@ -190,6 +192,8 @@ int main(int argc, char *argv[]) {
painter.DrawImgData(img, *left_data.img);
cv::imshow("frame", img);
// LOG(INFO) << "left id: " << left_data.frame_id
// << ", right id: " << right_data.frame_id;
auto &&disp_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
auto &&depth_data = api->GetStreamData(Stream::DEPTH);
@@ -197,7 +201,7 @@ int main(int argc, char *argv[]) {
// Show disparity instead of depth, but show depth values in region.
auto &&depth_frame = disp_data.frame;
#ifdef USE_OPENCV3
#ifdef WITH_OPENCV3
// ColormapTypes
// http://docs.opencv.org/master/d3/d50/group__imgproc__colormap.html#ga9a805d8262bcbe273f16be9ea2055a65
cv::applyColorMap(depth_frame, depth_frame, cv::COLORMAP_JET);
@@ -208,6 +212,7 @@ int main(int argc, char *argv[]) {
depth_region.DrawRect(depth_frame);
cv::imshow("depth", depth_frame);
// LOG(INFO) << "depth id: " << disp_data.frame_id;
depth_region.ShowElems<ushort>(
depth_data.frame,
@@ -227,6 +232,7 @@ int main(int argc, char *argv[]) {
auto &&points_data = api->GetStreamData(Stream::POINTS);
if (!points_data.frame.empty()) {
pcviewer.Update(points_data.frame);
// LOG(INFO) << "points id: " << points_data.frame_id;
}
char key = static_cast<char>(cv::waitKey(1));