Merge branch 'master' of ssh://115.28.86.8:29418/~admin/智能网联_25-0305_617_v1
6 文件已复制
1 文件已重命名
21个文件已添加
3个文件已修改
2个文件已删除
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0626.doc"
Binary files differ
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0625.doc"
Binary files differ
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Client/\351\255\217\345\274\272/log/\346\227\245\345\277\227_\351\255\217\345\274\272_0626.doc"
Binary files differ
| | |
| | | #ifndef TCPDATATYPE_H |
| | | #define TCPDATATYPE_H |
| | | /*请æ±ç±»å*/ |
| | | /* */ |
| | | enum class ActionType |
| | | { |
| | | HeartCheck = 100, |
| | |
| | | Msg = 200, |
| | | Download = 300 |
| | | }; |
| | | /*åèHTTPçååºç */ |
| | | /* ο HTTP Ӧ */ |
| | | enum class ResponseCode |
| | | { |
| | | ResponseOK = 200, // è¯·æ±æåã |
| | | BadRequest = 400, // 客æ·ç«¯è¯·æ±çè¯æ³éè¯¯ï¼æå¡å¨æ æ³çè§£ |
| | | Unauthorized = 401, // 请æ±è¦æ±ç¨æ·çèº«ä»½è®¤è¯ |
| | | Forbidden = 403, // æå¡å¨ç解请æ±å®¢æ·ç«¯ç请æ±ï¼ä½æ¯æç»æ§è¡æ¤è¯·æ± |
| | | NotFound = 404, // æå¡å¨æ æ³æ¾å°è¯·æ±çèµæº |
| | | MethodNotAllowed = 405 // 客æ·ç«¯è¯·æ±ä¸çæ¹æ³è¢«ç¦æ¢ |
| | | ResponseOK = 200, // ɹ |
| | | BadRequest = 400, // ͻ 󣬷 ޷ |
| | | Unauthorized = 401, // Ҫ û ֤ |
| | | Forbidden = 403, // ͻ ˵ 󣬵 Ǿܾ ִ д |
| | | NotFound = 404, // Þ· Òµ Ô´ |
| | | MethodNotAllowed = 405 // ͻ еķ ֹ |
| | | |
| | | }; |
| | | /*æ¶æ¯ä½*/ |
| | | /* Ϣ */ |
| | | struct Head |
| | | { |
| | | ActionType type; |
| | |
| | | version = pversion; |
| | | } |
| | | }; |
| | | struct HeartCheckReq // å¿è·³è¯·æ±å
|
| | | struct HeartCheckReq // |
| | | { |
| | | ActionType type; |
| | | int len; |
| | |
| | | } |
| | | }; |
| | | |
| | | struct HeartCheckRes // å¿è·³ååºå
|
| | | struct HeartCheckRes // Ó¦ |
| | | { |
| | | ActionType type; |
| | | int len; |
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250625.doc"
Binary files differ
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Server/\346\242\201\345\215\232/log/~WRL0005.tmp"
Binary files differ
New file |
| | |
| | | // ImageStorage.cpp - ç
§çå卿¨¡åå®ç° |
| | | #include "stdafx.h" |
| | | #include "ImageStorage.h" |
| | | #include <fstream> |
| | | #include <opencv2/opencv.hpp> |
| | | |
| | | ImageStorage::ImageStorage() {} |
| | | |
| | | ImageStorage::~ImageStorage() {} |
| | | |
| | | bool ImageStorage::SaveImage(const std::string& filePath, const unsigned char* imageData, |
| | | int width, int height) { |
| | | try { |
| | | // å建OpenCVå¾å |
| | | cv::Mat image(height, width, CV_8UC3, const_cast<unsigned char*>(imageData)); |
| | | |
| | | // ä¿åå¾å |
| | | return cv::imwrite(filePath, image); |
| | | } |
| | | catch (const std::exception& e) { |
| | | std::cerr << "ä¿åå¾å失败: " << e.what() << std::endl; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | bool ImageStorage::LoadImage(const std::string& filePath, unsigned char*& imageData, |
| | | int& width, int& height) const { |
| | | try { |
| | | // å è½½å¾å |
| | | cv::Mat image = cv::imread(filePath, cv::IMREAD_COLOR); |
| | | |
| | | if (image.empty()) { |
| | | return false; |
| | | } |
| | | |
| | | // åé
å
åå¹¶å¤å¶æ°æ® |
| | | width = image.cols; |
| | | height = image.rows; |
| | | size_t dataSize = width * height * 3; |
| | | |
| | | imageData = new unsigned char[dataSize]; |
| | | memcpy(imageData, image.data, dataSize); |
| | | |
| | | return true; |
| | | } |
| | | catch (const std::exception& e) { |
| | | std::cerr << "å è½½å¾å失败: " << e.what() << std::endl; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | bool ImageStorage::DeleteImage(const std::string& filePath) { |
| | | return (remove(filePath.c_str()) == 0); |
| | | } |
New file |
| | |
| | | // ImageStorage.h - ç
§çå卿¨¡å |
| | | #pragma once |
| | | #include <string> |
| | | #include <vector> |
| | | #include "FaceImageManager.h" |
| | | |
| | | class ImageStorage { |
| | | public: |
| | | ImageStorage(); |
| | | ~ImageStorage(); |
| | | |
| | | bool SaveImage(const std::string& filePath, const unsigned char* imageData, |
| | | int width, int height); |
| | | bool LoadImage(const std::string& filePath, unsigned char*& imageData, |
| | | int& width, int& height) const; |
| | | bool DeleteImage(const std::string& filePath); |
| | | }; |
copy from "Server/\346\242\201\345\215\232/log/~WRL1314.tmp"
copy to "Server/\346\261\252\345\215\253\345\206\233/log/\346\227\245\345\277\227_\346\261\252\345\215\253\345\206\233_0625.doc"
Binary files differ
New file |
| | |
| | | Subproject commit 0000000000000000000000000000000000000000 |
| | | Subproject commit 89d19ad386e768e8e54b6aa4b1d42f4617ceed03 |