Use the command: ls -d $PWD/*.jpg > valid.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls -1 *.png | xargs -n 1 bash -c 'convert "$0" "${0%.png}.jpg"' |
Command to use: find . -type f -name '*.txt' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
Settings selected: sudo pwmconfig
Settings for hwmon0/device/pwm2:
Depends on hwmon0/device/temp2_input
Controls hwmon0/device/fan2_input
MINTEMP=40
MAXTEMP=60
MINSTART=150
MINSTOP=0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 0.1 nvidia-smi |
Make your installation aware of the HDF5 libs, that have changing names:
spu@dellSPU:/usr/lib/x86_64-linux-gnu$ sudo ln -s libhdf5_serial.so libhdf5.so
spu@dellSPU:/usr/lib/x86_64-linux-gnu$ sudo ln -s libhdf5_serial_hl.so libhdf5_hl.so
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Initialize the tracking interface | |
cv::MultiTracker faceTrackers("KCF"); | |
vector< cv::Rect > objectsToTrack; | |
while(true){ | |
capture >> frame; | |
std::vector< cv::Rect > dets_OpenCV; | |
model.detectMultiScale(frame, dets_OpenCV, 1.2, 3); |
If your Ceres
installation is built with C++11 instructions enabled, then make sure you tell OpenCV to build its modules with c++11 support. This can be done by adding the following entry inside your cmake gui
- Make an new entry with
CMAKE_CXX_STANDARD = 11
- Or simply add
-DCMAKE_CXX_STANDARD=11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Considering you have a contour available after segmentation | |
/// Considering you have an image where the contour is found | |
vector<Point> contour; | |
Mat image; | |
/// Get the RotatedRect associated with the contour | |
RotatedRect rect = minAreaRect(contour); | |
/// Also select the corner points for rotating back | |
Point2f pts[4]; rect.points(pts); | |
/// Define the angle of rotation and rotate the selection to an upright position | |
/// This will work for slight rotations, once going over 45 degrees this might result in wrong transformations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Approach 1 | |
Mat result_channel(rows, cols, CV_8UC3); | |
Mat in[] = { blue_channel, green_channel, red_channel }; | |
int from_to[] = { 0,0, 1,1, 2,2 }; | |
mixChannels( in, 3, &result_channel, 1, from_to, 3 ); | |
// Approach 2 | |
blue_channel.copyTo( result_channel( Rect(0, 0, cols, rows) ) ); | |
green_channel.copyTo( result_channel( Rect(cols, 0, cols, rows) ) ); | |
red_channel.copyTo( result_channel( Rect(cols*2, 0, cols, rows) ) ); |
NewerOlder