fix(api): update version checker to new sdk version
This commit is contained in:
parent
8f50f8d214
commit
e325706c9d
|
@ -34,8 +34,8 @@ int main(int argc, char *argv[]) {
|
|||
api->Start(Source::VIDEO_STREAMING);
|
||||
|
||||
cv::namedWindow("frame");
|
||||
// cv::namedWindow("disparity");
|
||||
cv::namedWindow("disparity_normalized");
|
||||
cv::namedWindow("disparity");
|
||||
// cv::namedWindow("disparity_normalized");
|
||||
|
||||
while (true) {
|
||||
api->WaitForStreams();
|
||||
|
@ -49,16 +49,16 @@ int main(int argc, char *argv[]) {
|
|||
cv::imshow("frame", img);
|
||||
}
|
||||
|
||||
// auto &&disp_data = api->GetStreamData(Stream::DISPARITY);
|
||||
// if (!disp_data.frame.empty()) {
|
||||
// cv::imshow("disparity", disp_data.frame);
|
||||
// }
|
||||
|
||||
auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
|
||||
if (!disp_norm_data.frame.empty()) {
|
||||
cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1
|
||||
auto &&disp_data = api->GetStreamData(Stream::DISPARITY);
|
||||
if (!disp_data.frame.empty()) {
|
||||
cv::imshow("disparity", disp_data.frame);
|
||||
}
|
||||
|
||||
// auto &&disp_norm_data = api->GetStreamData(Stream::DISPARITY_NORMALIZED);
|
||||
// if (!disp_norm_data.frame.empty()) {
|
||||
// cv::imshow("disparity_normalized", disp_norm_data.frame); // CV_8UC1
|
||||
// }
|
||||
|
||||
char key = static_cast<char>(cv::waitKey(1));
|
||||
if (key == 27 || key == 'q' || key == 'Q') { // ESC/Q
|
||||
break;
|
||||
|
|
|
@ -34,9 +34,9 @@ class DepthProcessor : public Processor {
|
|||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
|
|
@ -31,12 +31,12 @@ class DisparityNormalizedProcessor : public Processor {
|
|||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
|
|
@ -36,9 +36,9 @@ class PointsProcessor : public Processor {
|
|||
std::string Name() override;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
|
|
@ -37,12 +37,12 @@ class PointsProcessorOCV : public Processor {
|
|||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
|
||||
private:
|
||||
cv::Mat Q_;
|
||||
|
|
|
@ -79,12 +79,12 @@ class RectifyProcessor : public Processor {
|
|||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
std::shared_ptr<Processor> const parent) override;
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
|
||||
private:
|
||||
void InitParams(IntrinsicsEquidistant in_left,
|
||||
|
|
|
@ -49,12 +49,12 @@ class RectifyProcessorOCV : public Processor {
|
|||
cv::Mat map11, map12, map21, map22;
|
||||
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
|
|
|
@ -56,12 +56,12 @@ class s1s2Processor : public RootProcessor {
|
|||
api::StreamData GetStreamData(const Stream &stream) override;
|
||||
std::vector<api::StreamData> GetStreamDatas(const Stream &stream) override; // NOLINT
|
||||
protected:
|
||||
inline Processor::process_type ProcessOutputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
inline Processor::process_type ProcessInputConnection() override {
|
||||
return Processor::WITHOUT_CLONE;
|
||||
}
|
||||
// inline Processor::process_type ProcessOutputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
// inline Processor::process_type ProcessInputConnection() override {
|
||||
// return Processor::WITHOUT_CLONE;
|
||||
// }
|
||||
Object *OnCreateOutput() override;
|
||||
bool OnProcess(
|
||||
Object *const in, Object *const out,
|
||||
|
|
|
@ -40,16 +40,22 @@ const char* PASS_OUTOF_TABLE_WARNING = "You're using a custom mynteye device";
|
|||
/**----device type-----sdk version---firmware version-----pass tag-----*/
|
||||
static const firmware_version_match_table_unit FSVM_TABLE[] ={
|
||||
/** S1030 */
|
||||
{"MYNT-EYE-S1030", ">2.3.0", ">2.2.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S1030", ">2.3.0", "2.2.0", WARN_DESCRIPTION_F},
|
||||
{"MYNT-EYE-S1030", ">2.3.0", "<2.2.0", ERRO_DESCRIPTION_F},
|
||||
{"MYNT-EYE-S1030", "<2.3.1", "<2.2.0", WARN_DESCRIPTION_S},
|
||||
{"MYNT-EYE-S1030", ">2.3.3", ">2.3.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S1030", ">2.3.3", "<2.4.0", WARN_DESCRIPTION_F},
|
||||
{"MYNT-EYE-S1030", ">0.0.0", ">2.2.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S1030", ">0.0.0", "<2.3.0", WARN_DESCRIPTION_F},
|
||||
/** S2100 */
|
||||
{"MYNT-EYE-S2100", ">2.3.0", ">0.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S2100", "<2.3.1", ">0.0", WARN_DESCRIPTION_S},
|
||||
{"MYNT-EYE-S2100", ">2.3.3", ">1.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S2100", ">2.3.3", "<1.1", WARN_DESCRIPTION_F},
|
||||
{"MYNT-EYE-S2100", ">2.3.0", ">0.9", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S2100", ">0.0.0", ">0.9", WARN_DESCRIPTION_S},
|
||||
{"MYNT-EYE-S2100", ">0.0.0", "<1.0", WARN_DESCRIPTION_F},
|
||||
/** S210A */
|
||||
{"MYNT-EYE-S210A", ">2.3.0", ">0.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S210A", "<2.3.1", ">0.0", WARN_DESCRIPTION_S},
|
||||
{"MYNT-EYE-S210A", ">2.3.3", ">1.0", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S210A", ">2.3.3", "<1.1", WARN_DESCRIPTION_F},
|
||||
{"MYNT-EYE-S210A", ">2.3.0", ">0.9", PASS_DESCRIPTION},
|
||||
{"MYNT-EYE-S210A", ">0.0.0", ">0.9", WARN_DESCRIPTION_S},
|
||||
{"MYNT-EYE-S210A", ">0.0.0", "<1.0", WARN_DESCRIPTION_F},
|
||||
};
|
||||
|
||||
void getVersion(const std::string &str, char *version) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user