load mri
D = double(squeeze(D));
h = slice(D, [], [], 1:size(D,3));
set(h, 'EdgeColor','none', 'FaceColor','interp')
alpha(.1)
8/24/2016
7/19/2016
double memcpy to byte, example. useful in serial communication
When we program the serial communication,
You may want to send double number in bytes, rather than strings.
In other words,
when we have 123123123123.123123123123 double value.
it is better send value to byte of sizeof(double), rather than the 25byte string.
The following example further, an example that sends a double 3 dogs as a byte.
...
In addition, if there is the data to be send prefix is as follows.
...
And so if you want to change the byte sent back to double is when you do the following:
...
You may want to send double number in bytes, rather than strings.
In other words,
when we have 123123123123.123123123123 double value.
it is better send value to byte of sizeof(double), rather than the 25byte string.
The following example further, an example that sends a double 3 dogs as a byte.
...
double x = 1234.4567+10; double y = 2345.6789+10; double z = 3456.7891+10; char sendingStr[sizeof(double) * 3]; memcpy(sendingStr, &x, sizeof(double)); memcpy(sendingStr + sizeof(double), &y, sizeof(double)); memcpy(sendingStr + sizeof(double) * 2, &z, sizeof(double)); m_Comm.WriteComm((BYTE*)sendingStr, sizeof(double) * 3);...
In addition, if there is the data to be send prefix is as follows.
...
double x = 1234.4567+10; double y = 2345.6789+10; double z = 3456.7891+10; char sendingStr[sizeof(double) * 3 + 2]; sendingStr[0] = '_'; sendingStr[1] = 'E'; memcpy(sendingStr + 2, &x, sizeof(double)); memcpy(sendingStr + 2 + sizeof(double), &y, sizeof(double)); memcpy(sendingStr + 2 + sizeof(double) * 2, &z, sizeof(double)); m_Comm.WriteComm((BYTE*)sendingStr, sizeof(double) * 3 + 2);...
And so if you want to change the byte sent back to double is when you do the following:
...
double Mx, My, Mz; memcpy(&Mx, MxyzStr, sizeof(double)); memcpy(&My, MxyzStr+sizeof(double), sizeof(double)); memcpy(&Mz, MxyzStr + sizeof(double)*2, sizeof(double));...
Creating a ghost usb boot
firstly, download this files, on here.
This link is my amazon drive. safe.
https://www.amazon.com/clouddrive/share/UsWjAZW1CWCnyIKsqSgzbXhyD10GdkQOTYoQNyNyBNv?ref_=cd_ph_share_link_copy
1)
HPUSBDisk.exe to install the files.
Run the installation file.
Unpack the compressed Bootingimg.zip.
and It sets the path where you extracted.
And click start button.
2)
autoexec.txt, and config.sys file to save your the usb.
(Autoexec.txt file is changed to the autoexec.bat file name.)
3)
After you extract the compressed GHOST.zip, stores with usb.
4)
Now the end if you set the boot order to boot to a usb!
5)
When the boot is called A:> , A:> ghost.exe you can run the ghost.
This link is my amazon drive. safe.
https://www.amazon.com/clouddrive/share/UsWjAZW1CWCnyIKsqSgzbXhyD10GdkQOTYoQNyNyBNv?ref_=cd_ph_share_link_copy
1)
HPUSBDisk.exe to install the files.
Run the installation file.
Unpack the compressed Bootingimg.zip.
and It sets the path where you extracted.
And click start button.
2)
autoexec.txt, and config.sys file to save your the usb.
(Autoexec.txt file is changed to the autoexec.bat file name.)
3)
After you extract the compressed GHOST.zip, stores with usb.
4)
Now the end if you set the boot order to boot to a usb!
5)
When the boot is called A:> , A:> ghost.exe you can run the ghost.
opencv 3.0 trackbar simple example in video
simple example but good to understand
check..
What is the role of on_trackbar?
But function in Canny g_slider value, why use it?
< git hub - gist >
///
check..
What is the role of on_trackbar?
But function in Canny g_slider value, why use it?
< git hub - gist >
///
opencv 3.0 trackbar usage simple example
very very simple example
but easy to know the principle
< git-hub gist >
///
but easy to know the principle
< git-hub gist >
///
7/17/2016
Gpu usage check util => gpu shark
this link is to get down safely.
My amazon drive.
https://www.amazon.com/clouddrive/share/a3QoYYd7aEUa13wFvhUNBWDQb5h41FFrSotU17jI7sc?ref_=cd_ph_share_link_copy
My amazon drive.
https://www.amazon.com/clouddrive/share/a3QoYYd7aEUa13wFvhUNBWDQb5h41FFrSotU17jI7sc?ref_=cd_ph_share_link_copy
7/14/2016
OpenCV Mouse event example code
You can capture mouse event very easy using callback function.
"setMouseCallback” function is that callback function setting.
< gist start >
< gist end >
#tags
setMouseCallback,
"setMouseCallback” function is that callback function setting.
And many another events, so we can do various of application.
EVENT_MOUSEMOVE = 0,
EVENT_LBUTTONDOWN = 1,
EVENT_RBUTTONDOWN = 2,
EVENT_MBUTTONDOWN = 3,
EVENT_LBUTTONUP = 4,
EVENT_RBUTTONUP = 5,
EVENT_MBUTTONUP = 6,
EVENT_LBUTTONDBLCLK = 7,
EVENT_RBUTTONDBLCLK = 8,
EVENT_MBUTTONDBLCLK = 9,
EVENT_MOUSEWHEEL = 10,
EVENT_MOUSEHWHEEL = 11
< gist start >
< gist end >
#tags
setMouseCallback,
Subscribe to:
Posts (Atom)
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
RTSP(Real Time Streaming Protocol) is video streaming, it usually sent from network camera. VideoCapture function in opencv also can get r...
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
This example source code is to extract HOG feature from images. And save descriptors to XML file. The source code explain how to use HOGD...
-
After training SVM, we should test the trained XML data is reliable or not.. The method to extract HOG feature is refer to -> http://fe...
-
EMD(earth mover distance) method is very good method to compare image similarity. But processing time is slow. For using the EMD compare, ...
-
The MNIST dataset is a dataset of handwritten digits, comprising 60 000 training examples and 10 000 test examples. The dataset can be downl...