Open
Conversation
Faster initialization of matrices
| #include "models.h" | ||
|
|
||
| namespace models { | ||
| class [[maybe_unused]] camera: public models { |
There was a problem hiding this comment.
Лучше именовать типы с заглавной, Camera. Это консистентно со схемой именования OpenCV, ну и вообще так почти все делают.
| // Функция для проеции точек моделей на плоскость камеры | ||
| [[maybe_unused]] void displayModelPoints(const std::shared_ptr<models>& models); | ||
|
|
||
| [[maybe_unused]] cv::Mat getCameraPlane(); |
There was a problem hiding this comment.
Suggested change
| [[maybe_unused]] cv::Mat getCameraPlane(); | |
| [[maybe_unused]] cv::Mat getCameraPlane() const; |
Если оно не должно менять состояние объекта
|
|
||
| #include "opencv2/opencv.hpp" | ||
|
|
||
| enum Axis{ |
There was a problem hiding this comment.
Интересно, что enum вне неймспейса. Алсо, enum class.
| { | ||
| int n; | ||
| std::istringstream aStream(a); | ||
| aStream>>n; |
There was a problem hiding this comment.
Suggested change
| aStream>>n; | |
| aStream >> n; |
| else if(substring == "f " || substring == "l ") { | ||
| std::istringstream v(line.substr(1)); | ||
| std::string token; | ||
| std::vector<int> kek; |
|
|
||
| [[maybe_unused]] bool isValid(); | ||
| virtual bool specificBorderIsValid() = 0; | ||
| }; |
Owner
There was a problem hiding this comment.
virtual destructor here and further
| @@ -0,0 +1,12 @@ | |||
| #ifndef VISUALIZER_BORDERVALIDATOR_H | |||
| #define VISUALIZER_BORDERVALIDATOR_H | |||
Owner
There was a problem hiding this comment.
#pragma once
here and further
| class Borders: public models{ | ||
| protected: | ||
| std::shared_ptr<BorderValidator> validator; | ||
| public: |
Owner
There was a problem hiding this comment.
Right order:
public
protected
private
| class [[maybe_unused]] camera: public models { | ||
| private: | ||
| cv::Mat cameraPlane; | ||
| cv::Mat internalCameraParameters; |
| double zAngle; | ||
|
|
||
| public: | ||
| void move(const cv::Vec3d& offset); |
| std::vector<std::vector<int>> getIndexes(); | ||
| cv::Vec3d getCoordinatesOfCenter(); | ||
| models(); | ||
| void moveInLocalCoordinates(cv::Vec3d vector); |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.