Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir-Rashid committed Oct 26, 2023
1 parent 956eabc commit ff9b1e8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 137 deletions.
19 changes: 0 additions & 19 deletions deps/opencv/CMakeLists.txt.stackoverflow

This file was deleted.

48 changes: 1 addition & 47 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,52 +1,6 @@
# { pkgs ? import <nixpkgs> {} }:

# pkgs.mkShell {
# buildInputs = [
# pkgs.gcc
# pkgs.cmake
# pkgs.libclang
# pkgs.xz
# pkgs.bzip2
# ];
# LD_LIBRARY_PATH = lib.makeLibPath [ pkgs.bzip2 pkgs.xz ];

# shellHook = ''
# CURRENTDIR=$PWD
# CONF_FILE=Arena_SDK.conf

# echo
# echo "Arena SDK configuration script"
# echo "Usage: Arena_SDK_Linux_x64.conf [-r]"
# echo "-r: Remove existing $CONF_FILE before add new paths"
# echo

# if [ "$1" = "-r" ]; then
# echo "Removing existing $CONF_FILE"
# sudo rm -f /etc/ld.so.conf.d/$CONF_FILE
# echo
# fi

# echo "Adding the following Arena SDK library paths to /etc/ld.so.conf.d/$CONF_FILE:"
# echo
# echo "$CURRENTDIR/lib64"
# echo "$CURRENTDIR/GenICam/library/lib/Linux64_x64"
# echo "$CURRENTDIR/ffmpeg"

# sh -c "echo $CURRENTDIR/deps/arena-sdk/ArenaSDK_Linux_x64/lib64/lib64 > /etc/ld.so.conf.d/$CONF_FILE"
# sh -c "echo $CURRENTDIR/deps/arena-sdk/ArenaSDK_Linux_x64/lib64/GenICam/library/lib/Linux64_x64 >> /etc/ld.so.conf.d/$CONF_FILE"
# sh -c "echo $CURRENTDIR/deps/arena-sdk/ArenaSDK_Linux_x64/lib64/ffmpeg >> /etc/ld.so.conf.d/$CONF_FILE"

# echo
# echo "Please remember to install these packages if not already installed before proceeding:"
# echo "- g++ 5 or higher"
# echo "- make"
# '';
# }


{pkgs ? import <nixpkgs> {}}:
(pkgs.buildFHSUserEnv {
name = "python 3.9";
name = "OBCPP";
targetPkgs = pkgs: (with pkgs; [
python3
ccache
Expand Down
45 changes: 0 additions & 45 deletions shell.nix.bak

This file was deleted.

45 changes: 19 additions & 26 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,29 @@

using namespace cv;

int main() {
std::cout << "hellasdfasdfTarget torch_cpu not found.o" << std::endl;
int main()
{
std::cout << "hellasdfasdfTarget torch_cpu not found.o" << std::endl;

PreparationState state;
PreparationState state;

state.tick();
state.tick();

torch::Tensor tensor = torch::rand({2, 3});
std::cout << tensor << std::endl;

//create a gui window:
// namedWindow("Output",1);

//initialize a 120X350 matrix of black pixels:
Mat output = Mat::zeros( 120, 350, CV_8UC3 );

//write text on the matrix:
putText(output,
"Hello World :)",
Point(15,70),
FONT_HERSHEY_PLAIN,
3,
Scalar(0,255,0),
4);

//display the image:
imwrite("Output.png", output);

//wait for the user to press any key:
// waitKey(0);

return 0;
Mat output = Mat::zeros(120, 350, CV_8UC3);

// write text on the matrix:
putText(output,
"Hello World :)",
Point(15, 70),
FONT_HERSHEY_PLAIN,
3,
Scalar(0, 255, 0),
4);

imwrite("Output.png", output);

return 0;
}

0 comments on commit ff9b1e8

Please sign in to comment.