求图像处理的例图

shn_baby 2021-05-19 09:41:21
现在刚开始做图像处理,不知道从哪里下载用来处理的图像,各位大大有没有可供下载的网站或者能下载的途径呀?

想找有特征的图像,类似网络上专门用来测试连通域和专门用来测试腐蚀膨胀的那种,BMP格式的图像,谢谢大大
...全文
2278 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
shn_baby 2021-05-19
  • 打赏
  • 举报
回复
引用 1 楼 赵4老师 的回复:
随便搜个物体检测的数据集。
您好,主要是不需要特别大的数据集。我的需要是我在做某一块时有1到2张刚好合适的测试图就好了,就像是数字图像处理一书中的那种特别明显的图像就好了。主要是不清楚怎么寻找或者怎么自己做出来。。。
赵4老师 2021-05-19
  • 打赏
  • 举报
回复
随便搜个物体检测的数据集。
赵4老师 2021-05-19
  • 打赏
  • 举报
回复
赵4老师 2021-05-19
  • 打赏
  • 举报
回复
提醒: Image Magick自带命令行工具convert.exe可用于批量转换图片格式。
赵4老师 2021-05-19
  • 打赏
  • 举报
回复
引用 4 楼 shn_baby 的回复:
[quote=引用 3 楼 赵4老师 的回复:]百度或必应搜索图片也可以用啊。
百度或者必应的图片都不是指定的格式,格式工厂转换出来的图像不是BMP的标准格式,所以不清楚怎么找标准的图像[/quote] 不是标准的BMP,你可以自己用 c++ opencv python opencv pillow gdi+ Image Magick …… 自己编写一个小程序,转换成标准BMP格式。 以下为gdi+程序,仅供参考:
Private Type GdiplusStartupInput
   GdiplusVersion As Long
   DebugEventCallback As Long
   SuppressBackgroundThread As Long
   SuppressExternalCodecs As Long
End Type

Private Declare Function GdiplusStartup Lib "gdiplus" (token As Long, inputbuf As GdiplusStartupInput, Optional ByVal outputbuf As Long = 0) As Long
Private Declare Function GdipCreateBitmapFromScan0 Lib "gdiplus" (ByVal Width As Long, ByVal Height As Long, ByVal stride As Long, ByVal PixelFormat As Long, scan0 As Any, bitmap As Long) As Long
Private Declare Function GdipCreatePen1 Lib "gdiplus" (ByVal color As Long, ByVal Width As Single, ByVal unit As Long, pen As Long) As Long
Private Declare Function GdipGetImageGraphicsContext Lib "gdiplus" (ByVal Image As Long, graphics As Long) As Long
Private Declare Function GdipDrawLine Lib "gdiplus" (ByVal graphics As Long, ByVal pen As Long, ByVal x1 As Single, ByVal y1 As Single, ByVal x2 As Single, ByVal y2 As Single) As Long
Private Declare Function CLSIDFromString Lib "ole32" (ByVal lpsz As Long, pclsid As Any) As Long
Private Declare Function GdipSaveImageToFile Lib "gdiplus" (ByVal Image As Long, ByVal filename As Long, clsidEncoder As Any, encoderParams As Any) As Long
Private Declare Function GdipDeletePen Lib "gdiplus" (ByVal pen As Long) As Long
Private Declare Function GdipDeleteGraphics Lib "gdiplus" (ByVal graphics As Long) As Long
Private Declare Function GdipDisposeImage Lib "gdiplus" (ByVal Image As Long) As Long
Private Declare Function GdiplusShutdown Lib "gdiplus" (ByVal token As Long) As Long

Private Sub Command1_Click()
    Const PNGFile As String = "D:\1.png"
    Const PixelFormat32bppARGB As Long = &H26200A
    Const CLSID_PNG As String = "{557CF406-1A04-11D3-9A73-0000F81EF32E}"

    Dim token As Long
    Dim GpInput As GdiplusStartupInput
    Dim ReturnValue As Long

    Dim bitmap As Long
    Dim graphics As Long
    Dim pen As Long

    Dim PngClsid(15) As Byte
    Dim Params(7) As Long

    '初始化GDI
    GpInput.GdiplusVersion = 1
    ReturnValue = GdiplusStartup(token, GpInput)
    If ReturnValue <> 0 Then MsgBox "GDI初始化失败": Exit Sub

    '新建Bitmap
    GdipCreateBitmapFromScan0 100, 100, 0, PixelFormat32bppARGB, ByVal 0, bitmap

    '新建pen
    GdipCreatePen1 &H80FF0000, 10, 0, pen '半透明的红色

    '画线
    GdipGetImageGraphicsContext bitmap, graphics
    GdipDrawLine graphics, pen, 10, 20, 60, 70

    '保存为PNG
    CLSIDFromString StrPtr(CLSID_PNG), PngClsid(0)
    GdipSaveImageToFile bitmap, StrPtr(PNGFile), PngClsid(0), Params(0)

    '扫地工作
    GdipDeletePen pen
    GdipDeleteGraphics graphics
    GdipDisposeImage bitmap
    GdiplusShutdown token
End Sub

  
Platform SDK: GDI+ 
Retrieving the Class Identifier for an Encoder
The function GetEncoderClsid in the following example receives the MIME type of an encoder and returns the class identifier (CLSID) of that encoder. The MIME types of the encoders built into GDI+ are as follows: 

image/bmp 
image/jpeg 
image/gif 
image/tiff 
image/png 
The function calls GetImageEncoders to get an array of ImageCodecInfo objects. If one of the ImageCodecInfo objects in that array represents the requested encoder, the function returns the index of the ImageCodecInfo object and copies the CLSID into the variable pointed to by pClsid. If the function fails, it returns –1. 

int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
{
   UINT  num = 0;          // number of image encoders
   UINT  size = 0;         // size of the image encoder array in bytes

   ImageCodecInfo* pImageCodecInfo = NULL;

   GetImageEncodersSize(&num, &size);
   if(size == 0)
      return -1;  // Failure

   pImageCodecInfo = (ImageCodecInfo*)(malloc(size));
   if(pImageCodecInfo == NULL)
      return -1;  // Failure

   GetImageEncoders(num, size, pImageCodecInfo);

   for(UINT j = 0; j < num; ++j)
   {
      if( wcscmp(pImageCodecInfo[j].MimeType, format) == 0 )
      {
         *pClsid = pImageCodecInfo[j].Clsid;
         free(pImageCodecInfo);
         return j;  // Success
      }    
   }

   free(pImageCodecInfo);
   return -1;  // Failure
}
The following console application calls the GetEncoderClsid function to determine the CLSID of the PNG encoder:

#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;

#include "GdiplusHelperFunctions.h"

INT main()
{
   // Initialize GDI+.
   GdiplusStartupInput gdiplusStartupInput;
   ULONG_PTR gdiplusToken;
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

   CLSID  encoderClsid;
   INT    result;
   WCHAR  strGuid[39];

   result = GetEncoderClsid(L"image/png", &encoderClsid);

   if(result < 0)
   {
      printf("The PNG encoder is not installed.\n");
   }
   else
   {
      StringFromGUID2(encoderClsid, strGuid, 39);
      printf("An ImageCodecInfo object representing the PNG encoder\n");
      printf("was found at position %d in the array.\n", result);
      wprintf(L"The CLSID of the PNG encoder is %s.\n", strGuid);
   }

   GdiplusShutdown(gdiplusToken);
   return 0;
}
When you run the preceding console application, you get an output similar to the following:

An ImageCodecInfo object representing the PNG encoder
was found at position 4 in the array.
The CLSID of the PNG encoder is {557CF406-1A04-11D3-9A73-0000F81EF32E}.
Platform SDK Release: August 2001  What did you think of this topic?
Let us know.  Order a Platform SDK CD Online
(U.S/Canada)   (International) 

 
shn_baby 2021-05-19
  • 打赏
  • 举报
回复
引用 3 楼 赵4老师 的回复:
百度或必应搜索图片也可以用啊。
百度或者必应的图片都不是指定的格式,格式工厂转换出来的图像不是BMP的标准格式,所以不清楚怎么找标准的图像
赵4老师 2021-05-19
  • 打赏
  • 举报
回复
百度或必应搜索图片也可以用啊。

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧