Changeset 330 in flair-src for trunk/lib/FlairSensorActuator/src/Camera.cpp
- Timestamp:
- 09/25/19 15:29:26 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/Camera.cpp
r214 r330 117 117 void Camera::ProcessUpdate(core::io_data* data) { 118 118 if(getFrameworkManager()->IsLogging() && getFrameworkManager()->IsDeviceLogged(this)) { 119 Printf("todo logging and jpeg without opencv\n"); 120 /* 119 121 if(logFormat==LogFormat::JPG) { 120 122 data->GetMutex(); … … 143 145 } 144 146 data->ReleaseMutex(); 145 } 147 }*/ 146 148 } 147 149 IODevice::ProcessUpdate(data); … … 151 153 if(filename=="") filename="./"+ObjectName()+"_"+std::to_string(GetTime())+".jpg"; 152 154 string::size_type idx = filename.rfind('.'); 153 155 Printf("todo SavePictureToFile without opencv\n");/* 154 156 if(idx != string::npos) { 155 157 Printf("saving %s\n", filename.c_str()); … … 169 171 } else { 170 172 Warn("saving %s no file extension!\n", filename.c_str()); 171 } 173 }*/ 172 174 } 173 175 174 176 void Camera::SaveRawPictureToFile(string filename) const { 175 Printf("saving %s, size %i\n", filename.c_str(), output-> img->imageSize);177 Printf("saving %s, size %i\n", filename.c_str(), output->GetDataType().GetSize()); 176 178 std::ofstream pFile; 177 179 pFile.open(filename); 178 180 output->GetMutex(); 179 pFile.write(output-> img->imageData, output->img->imageSize);181 pFile.write(output->buffer, output->GetDataType().GetSize()); 180 182 output->ReleaseMutex(); 181 183
Note:
See TracChangeset
for help on using the changeset viewer.