Projektarbeit Line Following Robot bei Prof. Chowanetz im WS22/23
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

processing.cpp 926B

1234567891011121314151617181920212223242526
  1. #include "processing.h"
  2. Processing::Processing(/* args */)
  3. {
  4. }
  5. Processing::~Processing()
  6. {
  7. }
  8. void Processing::processImage(Mat& inputPicture, int thresholdValue, int gaussKernelSize)
  9. {
  10. //Idea here is: Processing module consists of two methods:
  11. // One (this) to do all kinds of stuff to the picture (grayscale conversion, threshold, gauss etc etc)
  12. // And one (the other one) to segment the lines.
  13. // No return value here as the input is passed by reference -> directly modified.
  14. cvtColor(inputPicture, inputPicture, COLOR_BGR2GRAY);
  15. threshold(inputPicture, inputPicture, thresholdValue, 255, THRESH_BINARY);
  16. GaussianBlur(inputPicture, inputPicture, Size(gaussKernelSize, gaussKernelSize), 0);
  17. }
  18. std::vector<LFRLine> Processing::calculateLineSegments(const Mat& inputPicture)
  19. {
  20. //https://stackoverflow.com/questions/45322630/how-to-detect-lines-in-opencv
  21. return std::vector<LFRLine>();
  22. }