refer to this code
thank you.
str = byte.decode( encoding='UTF-8')
byte2 = str.encode( encoding='UTF-8' )
8/27/2014
8/20/2014
8/18/2014
8/12/2014
Opencv float array to Mat
you can input float array data to Mat through this way.
float H[9]={1,2,3,4,5,6,7,8,9};
Mat TT = Mat(3,3,CV_32FC1, &H);
But becareful, if H value is changed, TT value is also changed.
See the example source code.
float H[9]; for(int i=0; i< 9; ++i) H[i] = i; for(int i=0; i< 9; ++i) cout << i << " : " << H[i] << endl; Mat TT = Mat(3,3,CV_32FC1, &H); cout << TT << endl; for(int i=0; i< 9; ++i) H[i] = i*10; cout << "TT values are chaned.." << endl; cout << TT << endl; cout << endl;
If we modify code like this..
Mat TT = Mat(3,3,CV_32FC1, &H);
-> Mat TT = Mat(3,3,CV_32FC1, &H).clone();
TT value is not affected by float array.
8/11/2014
CUDA Link2005 error.
I meet the this error when compile CUDA.
error LNK2005: "int __cdecl XXXX" (?XXXXX@@YAHXZ) already defined in XXX.cu.obj
I solved error from the web page. -> http://stackoverflow.com/questions/5295503/cuda-lnk2005-error-on-device-function-used-in-header-file
In my case, I add "inline" keyword front of cuda function name.
ex)
__device__ void matrix_set_identity(GPU_Matrix *A)
->
inline __device__ void matrix_set_identity(GPU_Matrix *A)
Thank you.
error LNK2005: "int __cdecl XXXX" (?XXXXX@@YAHXZ) already defined in XXX.cu.obj
I solved error from the web page. -> http://stackoverflow.com/questions/5295503/cuda-lnk2005-error-on-device-function-used-in-header-file
In my case, I add "inline" keyword front of cuda function name.
ex)
__device__ void matrix_set_identity(GPU_Matrix *A)
->
inline __device__ void matrix_set_identity(GPU_Matrix *A)
Thank you.
8/06/2014
nvcc : fatal error : Could not set up the environment for Microsoft Visual Studio using ...
I meet this error when I complie opencv + cuda.
I have tried hundreds of times to solve this problem.
I tried opencv 2.4.8 + cuda 5.5 + vs 2012
opencv 2.4.8 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 5.5 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2013.
when I almost dead, I find solution.
It is solution.
Open "nvcc.profile" by text editor.
This file may be located in "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin" (in my case)
And add this setense
CUDA_NVCC_FLAGS += --compiler-bindir = "-IE:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin"
so this figure is all contents of nvcc.profile.
I am happy to notice this tip to world.
^^
I have tried hundreds of times to solve this problem.
I tried opencv 2.4.8 + cuda 5.5 + vs 2012
opencv 2.4.8 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 5.5 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2012
opencv 2.4.9 + cuda 6 + vs 2013.
when I almost dead, I find solution.
It is solution.
Open "nvcc.profile" by text editor.
This file may be located in "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v6.0\bin" (in my case)
And add this setense
CUDA_NVCC_FLAGS += --compiler-bindir = "-IE:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin"
so this figure is all contents of nvcc.profile.
I am happy to notice this tip to world.
^^
Subscribe to:
Posts (Atom)
-
CUDA_ARCH_BIN Table for gpu type Jetson Products GPU Compute Capability Jetson AGX Xavier 7.2 Jetson Nano 5.3 Jetson TX2 6.2 Jetson TX1 5.3 ...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv <-> rgb converting example code. refer to this page -> ht...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
make different port number Window > .\python_embeded\python.exe -s ComfyUI\ main.py --port 8189 --windows-standalone-build Linux or Ma...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
On the window, we made new file easily by right button click. But on the mac, there is no function. So, very incompatible... By the way, ...
-
This is example for background subtraction on opencv 3.2 version previously, I post 2.7 version example on here. http://study.marearts.co...
-
error: . VanillaPipeline.get_train_loss_dict: 12.6875 Traceback (most recent call last): File "/home/mare/anaconda3...
-
>sudo lsof -i :8188 python 231134 mare 45u IPv4 2074469 0t0 TCP localhost:8188->localhost:42132 (CLOSE_WAIT) python 23113...