Save Fault Info to Database
This commit is contained in:
@@ -76,8 +76,14 @@ void ImageManager::ProcessImage(int width, int height, uint8_t *imgPointer)
|
||||
|
||||
if (area > fault_area)
|
||||
{
|
||||
drawContours(viewfinder, contours, i, Scalar(ZERO, BITS8, ZERO), 2);
|
||||
((FaultFinder*)(parent()))->fault_mgr->SaveImage();
|
||||
// Fault Detected, Draw on Screen and Save to Database
|
||||
drawContours(viewfinder, contours, i, Scalar(ZERO, BITS8, ZERO), 2);
|
||||
|
||||
std::vector<uchar> imageBuffer;
|
||||
imencode("pgm", frame, imageBuffer);
|
||||
QByteArray* imageBytes = new QByteArray(reinterpret_cast<const char*>(imageBuffer.data()), imageBuffer.size());
|
||||
|
||||
((FaultFinder*)(parent()))->fault_mgr->SaveImage(imageBytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user