Skip to content

Commit

Permalink
#29 Image not capturing
Browse files Browse the repository at this point in the history
  • Loading branch information
noshluk2 committed Sep 28, 2023
1 parent e61ec06 commit a9db07b
Show file tree
Hide file tree
Showing 11 changed files with 14,078 additions and 104 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Project # 1 Wifi Controlled Robot


# Project # 2 Line Following Robot
# Project # 3
- Camera not working properly
- Once that is done , install crow for websharing camera for image processing
8 changes: 5 additions & 3 deletions p3_rpi_follow_object_bot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Threads REQUIRED)
find_package(OpenCV REQUIRED)

include_directories(${CMAKE_SOURCE_DIR}/include/crow)

add_executable(motor_control_app src/main.cpp src/motor_control.cpp src/robot_motion.cpp)
target_include_directories(motor_control_app PRIVATE include)
target_link_libraries(motor_control_app Threads::Threads rt pigpiod_if2)
add_executable(motor_control_app src/main.cpp src/motor_control.cpp src/robot_motion.cpp src/camera_controller.cpp)
target_include_directories(motor_control_app PRIVATE include )
target_link_libraries(motor_control_app Threads::Threads rt pigpiod_if2 ${OpenCV_LIBS})
18 changes: 18 additions & 0 deletions p3_rpi_follow_object_bot/include/camera_controller.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef CAMERA_CONTROLLER_HPP
#define CAMERA_CONTROLLER_HPP

#include <opencv2/opencv.hpp>
#include <string>

class CameraController {
public:
CameraController();
~CameraController();
void recordVideo(int timeSecs, const std::string& name);
void captureImage(const std::string& name);
void startStreaming();
private:
cv::VideoCapture cap;
};

#endif // CAMERA_CONTROLLER_HPP
25 changes: 25 additions & 0 deletions p3_rpi_follow_object_bot/include/crow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#include "crow/query_string.h"
#include "crow/http_parser_merged.h"
#include "crow/ci_map.h"
#include "crow/TinySHA1.hpp"
#include "crow/settings.h"
#include "crow/socket_adaptors.h"
#include "crow/json.h"
#include "crow/mustache.h"
#include "crow/logging.h"
#include "crow/task_timer.h"
#include "crow/utility.h"
#include "crow/common.h"
#include "crow/http_request.h"
#include "crow/websocket.h"
#include "crow/parser.h"
#include "crow/http_response.h"
#include "crow/multipart.h"
#include "crow/routing.h"
#include "crow/middleware.h"
#include "crow/middleware_context.h"
#include "crow/compression.h"
#include "crow/http_connection.h"
#include "crow/http_server.h"
#include "crow/app.h"
Loading

0 comments on commit a9db07b

Please sign in to comment.