keypointintervallselection.hpp 1.07 KB
Newer Older
1 2 3
#ifndef CVVISUAL_KEY_POINT_INTERVALL_SELECTOR
#define CVVISUAL_KEY_POINT_INTERVALL_SELECTOR

Maksim Shabunin's avatar
Maksim Shabunin committed
4
#include "opencv2/features2d.hpp"
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

#include "keypointselection.hpp"
#include "keypointvaluechooser.hpp"
#include "../intervallselector.hpp"

namespace cvv
{
namespace qtutil
{
/**
 * @brief this widget select an intervall of matches from the given selection.
 * it use IntervallSelector
 */
class KeyPointIntervallSelector:public KeyPointSelection{

	Q_OBJECT
public:
	/**
	 * @brief the constructor
	 * @param matches all matches which can be selected
	 * @param parent the parent widget
	 */
	KeyPointIntervallSelector(std::vector<cv::KeyPoint> key,QWidget*parent=nullptr);

	/**
	 * @brief select matches from the given selecton
	 * @param selection the current selection
	 * @return the selected matches
	 */
	virtual std::vector<cv::KeyPoint> select(const std::vector<cv::KeyPoint>& selection)override;

private slots:

	void changeSelecteValue();
private:
	QLayout* layout_;
	IntervallSelector* selector_;
	KeyPointValueChooser * valueChooser_;
	std::vector<cv::KeyPoint> keypoints_;
};

}}
#endif