无需配置环境加载 JPG 图片的 C++ 代码示例
#include 
#include 
int main() {
  // 加载图片
  cv::Mat image = cv::imread("image.jpg");
  // 检查图片是否加载成功
  if (image.empty()) {
    std::cerr << "无法加载图片" << std>                  
                            
                            openCV加载jpg图片完整代码
                            预估大小:371个文件
                        
                        
                        
                                
                                imgproc_c.h
                                51KB
                            
                                                        
                                
                                cv_cpu_helper.h
                                27KB
                            
                                                        
                                
                                core_c.h
                                129KB
                            
                                                        
                                
                                msa_macros.h
                                82KB
                            
                                                        
                                
                                types_c.h
                                72KB
                            
                                                        
                                
                                cvdef.h
                                37KB
                            
                                                        
                                
                                constants_c.h
                                31KB
                            
                                                        
                                
                                dist.h
                                42KB
                            
                                                        
                                
                                kmeans_index.h
                                68KB
                            
                                                        
                                
                                autotuned_index.h
                                21KB
                            
                                                        
                                                        
                                                        
                                                        
                                                        
                                                        
                                                        
                                                        
                                                        
                                                        
                            
                            
                                                        
                                        
                                    文件大小:31.26MB
                                
                                
                                
                            
评论区