1. 程式人生 > >ubuntu14.04 install opencv2.4.11--NCVPixelOperations file

ubuntu14.04 install opencv2.4.11--NCVPixelOperations file

/*
    2  * Software License Agreement (BSD License)
    3  *
    4  *  Point Cloud Library (PCL) - www.pointclouds.org
    5  *  Copyright (C) 2009-2010, NVIDIA Corporation, all rights reserved.
    6  *  Third party copyrights are property of their respective owners.
    7  *
    8  *  All rights reserved.
    9  *
   10  *  Redistribution and use in source and binary forms, with or without
   11  *  modification, are permitted provided that the following conditions
   12  *  are met:
   13  *
   14  *   * Redistributions of source code must retain the above copyright
   15  *     notice, this list of conditions and the following disclaimer.
   16  *   * Redistributions in binary form must reproduce the above
   17  *     copyright notice, this list of conditions and the following
   18  *     disclaimer in the documentation and/or other materials provided
   19  *     with the distribution.
   20  *   * Neither the name of Willow Garage, Inc. nor the names of its
   21  *     contributors may be used to endorse or promote products derived
   22  *     from this software without specific prior written permission.
   23  *
   24  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   25  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   26  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   27  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
   28  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
   29  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
   30  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   31  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   32  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   33  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   34  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   35  *  POSSIBILITY OF SUCH DAMAGE.
   36  *
   37  * $Id:  $
   38  * Ported to PCL by Koen Buys : Attention Work in progress!
   39  */
    
    #ifndef _ncv_pixel_operations_hpp_
    #define _ncv_pixel_operations_hpp_
    
    #include <limits.h>
    #include <float.h>
    #include "NCV.hpp"
    
    template<typename TBase> inline __host__ __device__ TBase _pixMaxVal();
    template<>  inline __host__ __device__ Ncv8u  _pixMaxVal<Ncv8u>()  {return UCHAR_MAX;}
    template<>  inline __host__ __device__ Ncv16u _pixMaxVal<Ncv16u>() {return USHRT_MAX;}
    template<>  inline __host__ __device__ Ncv32u _pixMaxVal<Ncv32u>() {return  UINT_MAX;}
    template<>  inline __host__ __device__ Ncv8s  _pixMaxVal<Ncv8s>()  {return  SCHAR_MAX;}
    template<>  inline __host__ __device__ Ncv16s _pixMaxVal<Ncv16s>() {return  SHRT_MAX;}
    template<>  inline __host__ __device__ Ncv32s _pixMaxVal<Ncv32s>() {return   INT_MAX;}
    template<>  inline __host__ __device__ Ncv32f _pixMaxVal<Ncv32f>() {return   FLT_MAX;}
    template<>  inline __host__ __device__ Ncv64f _pixMaxVal<Ncv64f>() {return   DBL_MAX;}
    
    template<typename TBase> inline __host__ __device__ TBase _pixMinVal();
    template<>  inline __host__ __device__ Ncv8u  _pixMinVal<Ncv8u>()  {return 0;}
    template<>  inline __host__ __device__ Ncv16u _pixMinVal<Ncv16u>() {return 0;}
    template<>  inline __host__ __device__ Ncv32u _pixMinVal<Ncv32u>() {return 0;}
    template<>  inline __host__ __device__ Ncv8s  _pixMinVal<Ncv8s>()  {return SCHAR_MIN;}
    template<>  inline __host__ __device__ Ncv16s _pixMinVal<Ncv16s>() {return SHRT_MIN;}
    template<>  inline __host__ __device__ Ncv32s _pixMinVal<Ncv32s>() {return INT_MIN;}
    template<>  inline __host__ __device__ Ncv32f _pixMinVal<Ncv32f>() {return FLT_MIN;}
    template<>  inline __host__ __device__ Ncv64f _pixMinVal<Ncv64f>() {return DBL_MIN;}
    
    template<typename Tvec> struct TConvVec2Base;
    template<> struct TConvVec2Base<uchar1>  {typedef Ncv8u TBase;};
    template<> struct TConvVec2Base<uchar3>  {typedef Ncv8u TBase;};
    template<> struct TConvVec2Base<uchar4>  {typedef Ncv8u TBase;};
    template<> struct TConvVec2Base<ushort1> {typedef Ncv16u TBase;};
    template<> struct TConvVec2Base<ushort3> {typedef Ncv16u TBase;};
    template<> struct TConvVec2Base<ushort4> {typedef Ncv16u TBase;};
    template<> struct TConvVec2Base<uint1>   {typedef Ncv32u TBase;};
    template<> struct TConvVec2Base<uint3>   {typedef Ncv32u TBase;};
    template<> struct TConvVec2Base<uint4>   {typedef Ncv32u TBase;};
    template<> struct TConvVec2Base<float1>  {typedef Ncv32f TBase;};
    template<> struct TConvVec2Base<float3>  {typedef Ncv32f TBase;};
    template<> struct TConvVec2Base<float4>  {typedef Ncv32f TBase;};
    template<> struct TConvVec2Base<double1> {typedef Ncv64f TBase;};
    template<> struct TConvVec2Base<double3> {typedef Ncv64f TBase;};
    template<> struct TConvVec2Base<double4> {typedef Ncv64f TBase;};
    
    #define NC(T)       (sizeof(T) / sizeof(TConvVec2Base<T>::TBase))
    
    template<typename TBase, Ncv32u NC> struct TConvBase2Vec;
    template<> struct TConvBase2Vec<Ncv8u, 1>  {typedef uchar1 TVec;};
    template<> struct TConvBase2Vec<Ncv8u, 3>  {typedef uchar3 TVec;};
    template<> struct TConvBase2Vec<Ncv8u, 4>  {typedef uchar4 TVec;};
    template<> struct TConvBase2Vec<Ncv16u, 1> {typedef ushort1 TVec;};
    template<> struct TConvBase2Vec<Ncv16u, 3> {typedef ushort3 TVec;};
    template<> struct TConvBase2Vec<Ncv16u, 4> {typedef ushort4 TVec;};
    template<> struct TConvBase2Vec<Ncv32u, 1> {typedef uint1 TVec;};
    template<> struct TConvBase2Vec<Ncv32u, 3> {typedef uint3 TVec;};
    template<> struct TConvBase2Vec<Ncv32u, 4> {typedef uint4 TVec;};
    template<> struct TConvBase2Vec<Ncv32f, 1> {typedef float1 TVec;};
    template<> struct TConvBase2Vec<Ncv32f, 3> {typedef float3 TVec;};
    template<> struct TConvBase2Vec<Ncv32f, 4> {typedef float4 TVec;};
    template<> struct TConvBase2Vec<Ncv64f, 1> {typedef double1 TVec;};
    template<> struct TConvBase2Vec<Ncv64f, 3> {typedef double3 TVec;};
    template<> struct TConvBase2Vec<Ncv64f, 4> {typedef double4 TVec;};
   
   //TODO: consider using CUDA intrinsics to avoid branching
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampZ(Tin &a, Ncv8u &out) {out = (Ncv8u)CLAMP_0_255(a);};
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampZ(Tin &a, Ncv16u &out) {out = (Ncv16u)CLAMP(a, 0, USHRT_MAX);}
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampZ(Tin &a, Ncv32u &out) {out = (Ncv32u)CLAMP(a, 0, UINT_MAX);}
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampZ(Tin &a, Ncv32f &out) {out = (Ncv32f)a;}
 
   //TODO: consider using CUDA intrinsics to avoid branching
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Tin &a, Ncv8u &out) {out = (Ncv8u)CLAMP_0_255(a+0.5f);}
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Tin &a, Ncv16u &out) {out = (Ncv16u)CLAMP(a+0.5f, 0, USHRT_MAX);}
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Tin &a, Ncv32u &out) {out = (Ncv32u)CLAMP(a+0.5f, 0, UINT_MAX);}
   template<typename Tin> static inline __host__ __device__ void _TDemoteClampNN(Tin &a, Ncv32f &out) {out = (Ncv32f)a;}
   
   template<typename Tout> inline Tout _pixMakeZero();
   template<>  inline __host__ __device__ uchar1 _pixMakeZero<uchar1>() {return make_uchar1(0);}
   template<>  inline __host__ __device__ uchar3 _pixMakeZero<uchar3>() {return make_uchar3(0,0,0);}
   template<>  inline __host__ __device__ uchar4 _pixMakeZero<uchar4>() {return make_uchar4(0,0,0,0);}
   template<>  inline __host__ __device__ ushort1 _pixMakeZero<ushort1>() {return make_ushort1(0);}
   template<>  inline __host__ __device__ ushort3 _pixMakeZero<ushort3>() {return make_ushort3(0,0,0);}
   template<>  inline __host__ __device__ ushort4 _pixMakeZero<ushort4>() {return make_ushort4(0,0,0,0);}
   template<>  inline __host__ __device__ uint1 _pixMakeZero<uint1>() {return make_uint1(0);}
   template<>  inline __host__ __device__ uint3 _pixMakeZero<uint3>() {return make_uint3(0,0,0);}
   template<>  inline __host__ __device__ uint4 _pixMakeZero<uint4>() {return make_uint4(0,0,0,0);}
   template<>  inline __host__ __device__ float1 _pixMakeZero<float1>() {return make_float1(0.f);}
   template<>  inline __host__ __device__ float3 _pixMakeZero<float3>() {return make_float3(0.f,0.f,0.f);}
   template<>  inline __host__ __device__ float4 _pixMakeZero<float4>() {return make_float4(0.f,0.f,0.f,0.f);}
   template<>  inline __host__ __device__ double1 _pixMakeZero<double1>() {return make_double1(0.);}
   template<>  inline __host__ __device__ double3 _pixMakeZero<double3>() {return make_double3(0.,0.,0.);}
   template<>  inline __host__ __device__ double4 _pixMakeZero<double4>() {return make_double4(0.,0.,0.,0.);}
   
   static inline __host__ __device__ uchar1 _pixMake(Ncv8u x) {return make_uchar1(x);}
   static inline __host__ __device__ uchar3 _pixMake(Ncv8u x, Ncv8u y, Ncv8u z) {return make_uchar3(x,y,z);}
   static inline __host__ __device__ uchar4 _pixMake(Ncv8u x, Ncv8u y, Ncv8u z, Ncv8u w) {return make_uchar4(x,y,z,w);}
   static inline __host__ __device__ ushort1 _pixMake(Ncv16u x) {return make_ushort1(x);}
   static inline __host__ __device__ ushort3 _pixMake(Ncv16u x, Ncv16u y, Ncv16u z) {return make_ushort3(x,y,z);}
   static inline __host__ __device__ ushort4 _pixMake(Ncv16u x, Ncv16u y, Ncv16u z, Ncv16u w) {return make_ushort4(x,y,z,w);}
   static inline __host__ __device__ uint1 _pixMake(Ncv32u x) {return make_uint1(x);}
   static inline __host__ __device__ uint3 _pixMake(Ncv32u x, Ncv32u y, Ncv32u z) {return make_uint3(x,y,z);}
   static inline __host__ __device__ uint4 _pixMake(Ncv32u x, Ncv32u y, Ncv32u z, Ncv32u w) {return make_uint4(x,y,z,w);}
   static inline __host__ __device__ float1 _pixMake(Ncv32f x) {return make_float1(x);}
   static inline __host__ __device__ float3 _pixMake(Ncv32f x, Ncv32f y, Ncv32f z) {return make_float3(x,y,z);}
   static inline __host__ __device__ float4 _pixMake(Ncv32f x, Ncv32f y, Ncv32f z, Ncv32f w) {return make_float4(x,y,z,w);}
   static inline __host__ __device__ double1 _pixMake(Ncv64f x) {return make_double1(x);}
   static inline __host__ __device__ double3 _pixMake(Ncv64f x, Ncv64f y, Ncv64f z) {return make_double3(x,y,z);}
   static inline __host__ __device__ double4 _pixMake(Ncv64f x, Ncv64f y, Ncv64f z, Ncv64f w) {return make_double4(x,y,z,w);}
   
   
   template<typename Tin, typename Tout, Ncv32u CN> struct __pixDemoteClampZ_CN {static __host__ __device__ Tout _pixDemoteClampZ_CN(Tin &pix);};
   
   template<typename Tin, typename Tout> struct __pixDemoteClampZ_CN<Tin, Tout, 1> {
   static __host__ __device__ Tout _pixDemoteClampZ_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampZ(pix.x, out.x);
       return out;
   }};
   
   template<typename Tin, typename Tout> struct __pixDemoteClampZ_CN<Tin, Tout, 3> {
   static __host__ __device__ Tout _pixDemoteClampZ_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampZ(pix.x, out.x);
       _TDemoteClampZ(pix.y, out.y);
       _TDemoteClampZ(pix.z, out.z);
       return out;
   }};
   
   template<typename Tin, typename Tout> struct __pixDemoteClampZ_CN<Tin, Tout, 4> {
   static __host__ __device__ Tout _pixDemoteClampZ_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampZ(pix.x, out.x);
       _TDemoteClampZ(pix.y, out.y);
       _TDemoteClampZ(pix.z, out.z);
       _TDemoteClampZ(pix.w, out.w);
       return out;
   }};
   
   template<typename Tin, typename Tout> static inline __host__ __device__ Tout _pixDemoteClampZ(Tin &pix)
   {
       return __pixDemoteClampZ_CN<Tin, Tout, NC(Tin)>::_pixDemoteClampZ_CN(pix);
   }
   
   
   template<typename Tin, typename Tout, Ncv32u CN> struct __pixDemoteClampNN_CN {static __host__ __device__ Tout _pixDemoteClampNN_CN(Tin &pix);};
   
   template<typename Tin, typename Tout> struct __pixDemoteClampNN_CN<Tin, Tout, 1> {
   static __host__ __device__ Tout _pixDemoteClampNN_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampNN(pix.x, out.x);
       return out;
   }};
 
   template<typename Tin, typename Tout> struct __pixDemoteClampNN_CN<Tin, Tout, 3> {
   static __host__ __device__ Tout _pixDemoteClampNN_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampNN(pix.x, out.x);
       _TDemoteClampNN(pix.y, out.y);
       _TDemoteClampNN(pix.z, out.z);
       return out;
   }};
   
   template<typename Tin, typename Tout> struct __pixDemoteClampNN_CN<Tin, Tout, 4> {
   static __host__ __device__ Tout _pixDemoteClampNN_CN(Tin &pix)
   {
       Tout out;
       _TDemoteClampNN(pix.x, out.x);
       _TDemoteClampNN(pix.y, out.y);
       _TDemoteClampNN(pix.z, out.z);
       _TDemoteClampNN(pix.w, out.w);
       return out;
   }};
   
   template<typename Tin, typename Tout> static inline __host__ __device__ Tout _pixDemoteClampNN(Tin &pix)
   {
       return __pixDemoteClampNN_CN<Tin, Tout, NC(Tin)>::_pixDemoteClampNN_CN(pix);
   }
   
   
   template<typename Tin, typename Tout, typename Tw, Ncv32u CN> struct __pixScale_CN {static __host__ __device__ Tout _pixScale_CN(Tin &pix, Tw w);};
   
   template<typename Tin, typename Tout, typename Tw> struct __pixScale_CN<Tin, Tout, Tw, 1> {
   static __host__ __device__ Tout _pixScale_CN(Tin &pix, Tw w)
   {
       Tout out;
       typedef typename TConvVec2Base<Tout>::TBase TBout;
       out.x = (TBout)(pix.x * w);
       return out;
   }};
   
   template<typename Tin, typename Tout, typename Tw> struct __pixScale_CN<Tin, Tout, Tw, 3> {
   static __host__ __device__ Tout _pixScale_CN(Tin &pix, Tw w)
   {
       Tout out;
       typedef typename TConvVec2Base<Tout>::TBase TBout;
       out.x = (TBout)(pix.x * w);
       out.y = (TBout)(pix.y * w);
       out.z = (TBout)(pix.z * w);
       return out;
   }};
   
   template<typename Tin, typename Tout, typename Tw> struct __pixScale_CN<Tin, Tout, Tw, 4> {
   static __host__ __device__ Tout _pixScale_CN(Tin &pix, Tw w)
   {
       Tout out;
       typedef typename TConvVec2Base<Tout>::TBase TBout;
       out.x = (TBout)(pix.x * w);
       out.y = (TBout)(pix.y * w);
       out.z = (TBout)(pix.z * w);
       out.w = (TBout)(pix.w * w);
       return out;
   }};
   
   template<typename Tin, typename Tout, typename Tw> static __host__ __device__ Tout _pixScale(Tin &pix, Tw w)
   {
       return __pixScale_CN<Tin, Tout, Tw, NC(Tin)>::_pixScale_CN(pix, w);
   }
   
   
   template<typename Tin, typename Tout, Ncv32u CN> struct __pixAdd_CN {static __host__ __device__ Tout _pixAdd_CN(Tout &pix1, Tin &pix2);};
   
   template<typename Tin, typename Tout> struct __pixAdd_CN<Tin, Tout, 1> {
   static __host__ __device__ Tout _pixAdd_CN(Tout &pix1, Tin &pix2)
   {
       Tout out;
       out.x = pix1.x + pix2.x;
       return out;
   }};
   
   template<typename Tin, typename Tout> struct __pixAdd_CN<Tin, Tout, 3> {
   static __host__ __device__ Tout _pixAdd_CN(Tout &pix1, Tin &pix2)
   {
       Tout out;
       out.x = pix1.x + pix2.x;
       out.y = pix1.y + pix2.y;
       out.z = pix1.z + pix2.z;
       return out;
   }};
   
   template<typename Tin, typename Tout> struct __pixAdd_CN<Tin, Tout, 4> {
   static __host__ __device__ Tout _pixAdd_CN(Tout &pix1, Tin &pix2)
   {
       Tout out;
       out.x = pix1.x + pix2.x;
       out.y = pix1.y + pix2.y;
       out.z = pix1.z + pix2.z;
       out.w = pix1.w + pix2.w;
       return out;
   }};
   
   template<typename Tin, typename Tout> static __host__ __device__ Tout _pixAdd(Tout &pix1, Tin &pix2)
   {
       return __pixAdd_CN<Tin, Tout, NC(Tin)>::_pixAdd_CN(pix1, pix2);
   }
   
   
   template<typename Tin, typename Tout, Ncv32u CN> struct __pixDist_CN {static __host__ __device__ Tout _pixDist_CN(Tin &pix1, Tin &pix2);};
   
   template<typename Tin, typename Tout> struct __pixDist_CN<Tin, Tout, 1> {
   static __host__ __device__ Tout _pixDist_CN(Tin &pix1, Tin &pix2)
   {
       return Tout(SQR(pix1.x - pix2.x));
   }};
   
   template<typename Tin, typename Tout> struct __pixDist_CN<Tin, Tout, 3> {
   static __host__ __device__ Tout _pixDist_CN(Tin &pix1, Tin &pix2)
   {
       return Tout(SQR(pix1.x - pix2.x) + SQR(pix1.y - pix2.y) + SQR(pix1.z - pix2.z));
   }};
   
   template<typename Tin, typename Tout> struct __pixDist_CN<Tin, Tout, 4> {
   static __host__ __device__ Tout _pixDist_CN(Tin &pix1, Tin &pix2)
   {
       return Tout(SQR(pix1.x - pix2.x) + SQR(pix1.y - pix2.y) + SQR(pix1.z - pix2.z) + SQR(pix1.w - pix2.w));
   }};
   
   template<typename Tin, typename Tout> static __host__ __device__ Tout _pixDist(Tin &pix1, Tin &pix2)
   {
       return __pixDist_CN<Tin, Tout, NC(Tin)>::_pixDist_CN(pix1, pix2);
   }
   
   
   template <typename T> struct TAccPixWeighted;
   template<> struct TAccPixWeighted<uchar1> {typedef double1 type;};
   template<> struct TAccPixWeighted<uchar3> {typedef double3 type;};
   template<> struct TAccPixWeighted<uchar4> {typedef double4 type;};
   template<> struct TAccPixWeighted<ushort1> {typedef double1 type;};
   template<> struct TAccPixWeighted<ushort3> {typedef double3 type;};
   template<> struct TAccPixWeighted<ushort4> {typedef double4 type;};
   template<> struct TAccPixWeighted<float1> {typedef double1 type;};
   template<> struct TAccPixWeighted<float3> {typedef double3 type;};
   template<> struct TAccPixWeighted<float4> {typedef double4 type;};
   
   template<typename Tfrom> struct TAccPixDist {};
   template<> struct TAccPixDist<uchar1> {typedef Ncv32u type;};
   template<> struct TAccPixDist<uchar3> {typedef Ncv32u type;};
   template<> struct TAccPixDist<uchar4> {typedef Ncv32u type;};
   template<> struct TAccPixDist<ushort1> {typedef Ncv32u type;};
   template<> struct TAccPixDist<ushort3> {typedef Ncv32u type;};
   template<> struct TAccPixDist<ushort4> {typedef Ncv32u type;};
   template<> struct TAccPixDist<float1> {typedef Ncv32f type;};
   template<> struct TAccPixDist<float3> {typedef Ncv32f type;};
   template<> struct TAccPixDist<float4> {typedef Ncv32f type;};
   
   #endif //_ncv_pixel_operations_hpp_

相關推薦

ubuntu14.04 install opencv2.4.11--NCVPixelOperations file

/*    2  * Software License Agreement (BSD License)    3  *    4  *  Point Cloud Library (PCL) - www.pointclouds.org    5  *  Copyright (C

轉載:Ubuntu14.04opencv2.4.8、opencv3.0版本共存

下載安裝 -c details dir fix open sta 包含 4.0 轉載至:http://blog.csdn.net/hansry/article/details/75309906 由於安裝ROS的時候選擇安裝了ros-indigo-destop-full版本

Ubuntu14.04Opencv2.4.13使用遇到的問題

裝了雙系統,所以想把工作儘量在Ubuntu下面完成。以前在Windows下面使用opencv,現在想在Ubuntu下用。 編寫一個例子test.cpp:簡單的顯示圖片 #include <stdio.h> #include <opencv

Ubuntu14.04OpenCV2.4.10安裝

作業系統:Ubuntu 14.04 kylin版本,OpenCV 2.4.10 編譯前期準備工作 1)安裝依賴包 主要為build-essential軟體包,為編譯程式提供必要的軟體包的列別資訊,這樣軟體包才知道標頭檔案、庫函式的位置。此外,它還會下載依賴的軟體包

Ubuntu14.04下OpenCV3.4+contrib modules和OpenCV2.4.13的多版本共存

需要用到OpenCV的3版本和2版本,這兩個版本差別還挺大。這兩天在OpenCV這裡就遇到了很多坑,想寫一個最完整的配置環境的過程,希望給其他人帶來一些幫助。 一.安裝OpenCV2.4.13 1.安裝編譯工具 sudo apt-get install build-ess

VS2012+opencv2.4.11開發環境配置

相對路徑 應該 str AR lar tail user pen tps 主要參考https://blog.csdn.net/giantpoplar/article/details/47030205 https://blog.csdn.net/giantpoplar/art

ubuntu16.04 python opencv2.4.9安裝

href vision 12px 下載安裝 lease name align red light 1. 安裝python: 一般Ubuntu會自帶,如果需要其他自定版本,請自行下載安裝。 2. 下載OpenCV的源碼 OpenCV官網上有linux版本的源碼包可以下載,不

ubuntu14.04安裝opnecv3.4.4

ubuntu14.04安裝opnecv3.4.4 一.下載兩個zip檔案 opencv-3.4.4。這個從官網https://github.com/opencv/opencv/releases下載,下載opencv3.4.4中的source。 opencv_contri

win10下vs2013配置opencv2.4.11+測試程式碼

一、vs2013下載與安裝 下載並安裝vs2013 雙擊vs2013.4_ult_chs.iso檔案,雙擊vs_ultimate.exe進行安裝,安裝後直接啟動即可。 二、opencv2.4.11安裝 選擇Win pack,進入下載頁面... 2.下載完

Ubuntu14 04升級vim7 4到8 0

                             1  vim8.0釋出1.1   vim8.0時代來臨終於釋出了Vim 8.0, 北京時間 2016年9月12日 22:12,Bram 更新了 8.0 的 Announcement:After more than ten years there is

VS2012+opencv2.4.11安裝步驟

轉載安裝步驟:點選開啟連結 一定要細心安裝,不然會出很多小問題,。。。。 提出問題:解決永久配置問題:直接在“檢視”的“屬性管理器”中配置專案的Microsoft.Cpp.Win32的“屬性”中的包含目錄,庫目錄及連結器的輸入即可。再次新建專案不需再配置。

一勞永逸配置opencv2.4.11+vs2013的步驟

1、設定環境變數: 2、vs2013中,新建一個win32控制檯程式,空專案, 比如32位的。點選檢視-其他視窗-屬性視窗 3、在debug|win32中右鍵新建屬性表,命名為:PropertySheet_OpenCV2411_DEBUG32, 雙擊開啟後按照普通配置方法配置。其中庫目錄要注意是

目標檢測程式開發(一)——OpenCV2.4.11環境配置

本文使用的環境 作業系統:windows_8.1_x64(本文對x86同樣適用) 整合開發環境:visual_studio_ultimate_2013 OpenCV版本:opencv-2.4.11 第一步,下載並安裝OpenCV 在OpenCV官網下載http://ope

Ubuntu14.04安裝Opencv3.4.0

Ubuntu14.04安裝Opencv3.4.0 1.下載原始碼 2.安裝packages 3.安裝opencv 4.教程裡的一個例子 詳細操作步驟可參見官網 Installation in Linux

Ubuntu14.04安裝CMake3.4.1

由於Ubuntu14.04的cmake版本為2.8.x,而如果需要cmake3.x版本時,無法生成makefile,有兩種方法可以安裝cmake3.4.1: sudo apt-get install build-essential wget http://www.cmake

Win7平臺下 opencv2.4.11+CMake+Qt5.8.0 開發環境配置

為了把程式碼往arm-linux移植,準備先用qt來重新編譯程式碼。結果用了整整一天半的時間,終於配置成功了。 其中的過程是一步一個坎,極為坎坷,看部落格看得要吐,部分環節投機取巧,所幸最後配置成功。 現在就把這一天半以來的配置歷程總結一下,也為大家提供借鑑。第一次此寫技術

vs2013+opencv2.4.11環境:批量命名+處理圖片+規範儲存圖片名

       記得挺早之前做過一個深度學習相關的小專案,裡面要用到大量的圖片,但是圖片的名字不規整,而且一張一張處理起來太浪費時間,於是做了好久才寫出來,但是看著很彆扭感覺,今天重新整理一下批量命名和處理圖片。 寫一個指令碼檔案:process.bat,放在你想要的重新

win10搭建Visual Studio2013+OpenCV2.4.11+CMake3.9.2環境

通常情況下,我們需要使用opencv的庫函式時,只需將opencv的環境變數配置好就可以了,本人也在前面的文章中進行過介紹,部落格連結為http://blog.csdn.net/a2112233445566/article/details/38540389。但是如果我們想要檢視OpenCV原始碼、除錯Ope

ubuntu14.04 install and run yolov2

My computer setting is ubuntu14.04+GeForce GTX TiTan X+cuda 8+opencv 2.4.9sudo apt-get update1. install cuda 8install method can bu found

關於Ubuntu16.04安裝opencv2.4.13及編譯執行opencv程式的相關問題

因為學習的一些原因,開始接觸opencv,但是學習之路沒有堅持下來,電腦前前後後也出了很多毛病,重灌了很多次系統,每次重灌都需要重新安裝opencv,也碰到了很多問題,這次重新安裝記錄一下,以備不時之需。 1.安裝前準備; 安裝GCC: sudo apt-get insta