数字图像处理-编程实现染色体计数 C语言实现
调用的框架:http://blog.chinaunix.net/uid-20622737-id-3173056.html
实验内容:
对于下面这幅图像,编程实现染色体计数,并附简要处理流程说明。
处理步骤:
1. 读取图像,转换为灰度图像
平滑滤波去噪
图像二值化
对图像进行膨胀
再次膨胀(视情况而定)
腐蚀(视情况而定)
反转
统计连通区域个数并输出
保存图像。
void main()
{Bitmap *bmp = (Bitmap *)malloc(sizeof(Bitmap));// build an empty bmp to put the img.空变量呈放图片Bitmap *dstBmp = (Bitmap *)malloc(sizeof(Bitmap));Bitmap *graybmp = (Bitmap *)malloc(sizeof(Bitmap));Bitmap *smoothbmp = (Bitmap *)malloc(sizeof(Bitmap));Bitmap *binbmp = (Bitmap *)malloc(sizeof(Bitmap));Bitmap *temp = (Bitmap *)malloc(sizeof(Bitmap));int ret;char *path ="C:\\Users\\Ali\\Desktop\\1.bmp";ret = ReadBitmap(path, bmp);//读取图片char *savePath ="C:\\Users\\Ali\\Desktop\\zuizhong.bmp";RGB2Gray(bmp,graybmp);//转换成灰度图smooth(graybmp,smoothbmp);Gray2BW(smoothbmp,binbmp,155);//二值化pengzhang(binbmp, dstBmp); pengzhang(dstBmp, temp);fushi(temp,dstBmp);qufan(dstBmp,temp);/*BYTE *bitmap = temp->imageData;int width = temp->width;int height = temp->height;int *labelmap;ConnectedComponentLabeling(bitmap, width, height,labelmap); 有待调整 此处是调用本博客的另一篇文章二值图像统计连通区域*/SaveBitmap(savePath,temp);//保存图片
}
bmp.h
#ifndef BMP_H_INCLUDED
#define BMP_H_INCLUDED#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>/*** 位图文件结构及基本函数定义 打开和保存bmp文件*/
typedef unsigned short WORD;
typedef unsigned long DWORD;
typedef long LONG;
typedef unsigned char BYTE;/* 位图文件头结构 14字节 */
typedef struct tagBITMAPFILEHEADER {WORD bfType;DWORD bfSize;WORD bfReserved1;WORD bfReserved2;DWORD bfOffBits;
} BITMAPFILEHEADER;/* 位图信息头结构 40字节 */
typedef struct tagBITMAPINFOHEADER {DWORD biSize; // 结构长度 40BLONG biWidth;LONG biHeight;WORD biPlanes; // 1WORD biBitCount; // 表示颜色要用到的位数DWORD biCompression; // 压缩格式DWORD biSizeImage; // 位图占用字节数=biWidth'(4的整倍数)*biHeightLONG biXPelsPerMeter; // 水平分辨率LONG biYPelsPerMeter; // 垂直分辨率DWORD biClrUsed; // 本图像用到的颜色数DWORD biClrImportant; // 本图像的重要颜色数
} BITMAPINFOHEADER;/* 调色板 4字节 */
typedef struct tagRGBQUAD {BYTE rgbBlue;BYTE rgbGreen;BYTE rgbRed;BYTE rgbReserved;
} RGBQUAD;/* 定义图像信息 */
typedef struct tagBITMAPINFO {BITMAPINFOHEADER bmiHeader;RGBQUAD bmiColors[1];
} BITMAPINFO;/* 定义位图图像 */
typedef struct _Bitmap
{BITMAPFILEHEADER bmfh;BITMAPINFOHEADER bmih;int width;int height;int bitCount; // 8 或者24int imageSize; // 图像数据大小(imageSize=height*widthStep)字节BYTE* imageData;//排列的图像数据int widthStep; //排列的图像行大小
}Bitmap;/*** 位图创建函数 创建一个Bitmap结构,并为图像数据分配空间** 使用方法:* Bitmap *bmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=CreateBitmap(bmp,50,50,3);*/
int CreateBitmap(Bitmap* bmp, int width, int height, int bitCount)
{bmp->width=width;bmp->height=height;bmp->bmih.biWidth=width;bmp->bmih.biHeight=height;bmp->widthStep=(int)((width*bitCount+31)/32)*4; //计算排列的宽度bmp->imageSize=bmp->height*bmp->widthStep*sizeof(BYTE);//计算排列的图像大小if(bitCount==8){bmp->bitCount=8;bmp->bmfh.bfType=0x4d42; //注意是4d42 这个地方折磨我一下午啊bmp->bmfh.bfReserved1=0;bmp->bmfh.bfReserved2=0;bmp->bmih.biBitCount=8;bmp->bmih.biSize=40;bmp->bmih.biPlanes=1;bmp->bmfh.bfSize=54+256*4+height*bmp->widthStep;bmp->bmfh.bfOffBits=1078;bmp->bmih.biBitCount=8;bmp->bmih.biCompression=0;bmp->bmih.biSizeImage=bmp->imageSize;bmp->bmih.biClrUsed=0;bmp->bmih.biClrImportant=0;bmp->bmih.biXPelsPerMeter=0;bmp->bmih.biYPelsPerMeter=0;}else if (bitCount==24){bmp->bitCount=24;bmp->bmfh.bfType=0x4d42;bmp->bmih.biBitCount=24;bmp->bmfh.bfReserved1=0;bmp->bmfh.bfReserved2=0;bmp->bmih.biSize=40;bmp->bmih.biPlanes=1;bmp->bmfh.bfSize=54+height*bmp->widthStep;bmp->bmfh.bfOffBits=54;bmp->bmih.biBitCount=24;bmp->bmih.biSizeImage=bmp->imageSize;bmp->bmih.biClrUsed=0;bmp->bmih.biCompression=0;bmp->bmih.biClrImportant=0;bmp->bmih.biXPelsPerMeter=0;bmp->bmih.biYPelsPerMeter=0;}else{printf("Error(CreateBitmap): only supported 8 or 24 bits bitmap.\n");return -1;}bmp->imageData=(BYTE*)malloc(bmp->imageSize); //分配数据空间if(!(bmp->imageData)){printf("Error(CreateBitmap): can not allocate bitmap memory.\n");return -1;}return 0;
}/*** 位图指针释放函数 释放位图数据空间** 使用方法:* ReleaseBitmap(bmp);*/
void ReleaseBitmap(Bitmap* bmp)
{free(bmp->imageData);bmp->imageData=NULL;free(bmp);bmp=NULL;
}/*** 路径检查函数:是否为BMP文件,是否可读* 正确返回0,错误返回-1** 使用方法* ret=CheckPath(path);*/
int CheckPath(char *path)
{FILE *fd;int len = strlen(path) / sizeof(char);char ext[3];//check whether the path include the characters "bmp" at endstrncpy(ext, &path[len - 3], 3);if (!(ext[0] == 'b' && ext[1] == 'm' && ext[2] == 'p')) {printf("Error(CheckPath): the extension of the file is not bmp.\n");return -1;}//check whether the file can be read or notfd = fopen(path, "r");if (!fd){printf("Error(CheckPath): can not open the file.\n");return -1;}fclose(fd);return 0;
}/*** 从文件中读取位图de函数* 正确返回0,错误返回-1** 使用方法:* bmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=ReadBitmap(path, bmp);*/
int ReadBitmap(char* path, Bitmap* bmp)
{int ret;FILE *fd;//检查路径是否可读ret=CheckPath(path);if(ret==-1){printf("Error(ReadBitmap): the path of the image is invalid.\n");return -1;}//打开文件fd=fopen(path,"rb");if(fd==0){printf("Error(ReadBitmap): can not open the image.\n");return -1;}//读取文件信息头 14字节fread(&(bmp->bmfh.bfType),sizeof(WORD),1,fd);fread(&(bmp->bmfh.bfSize),sizeof(DWORD),1,fd);fread(&(bmp->bmfh.bfReserved1),sizeof(WORD),1,fd);fread(&(bmp->bmfh.bfReserved2),sizeof(WORD),1,fd);fread(&(bmp->bmfh.bfOffBits),sizeof(DWORD),1,fd);//读取位图信息头 40字节fread(&(bmp->bmih.biSize),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biWidth),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biHeight),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biPlanes),sizeof(WORD),1,fd);fread(&(bmp->bmih.biBitCount),sizeof(WORD),1,fd);fread(&(bmp->bmih.biCompression),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biSizeImage),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biXPelsPerMeter),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biYPelsPerMeter),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biClrUsed),sizeof(DWORD),1,fd);fread(&(bmp->bmih.biClrImportant),sizeof(DWORD),1,fd);//创建位图结构ret=CreateBitmap(bmp, bmp->bmih.biWidth, bmp->bmih.biHeight, bmp->bmih.biBitCount);if(ret==-1){printf("Error(CreateBitmap): can not CreateBitmap.\n");return -1;}//读取图像数据//由于4字节对齐格式fseek(fd,bmp->bmfh.bfOffBits,SEEK_SET); //定位到图像数据区ret=fread(bmp->imageData,bmp->imageSize,1,fd);if(ret==0){if(feof(fd)) //if the file pointer point to the end of the file{}if(ferror(fd)) //if error happened while read the pixel data{printf("Error(ReadBitmap): can not read the pixel data.\n");fclose(fd);return -1;}}//关闭文件fclose(fd);return 0;
}/*** 保存位图到文件中去* 正确返回0,错误返回-1** 使用方法:* bmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=SaveBitmap(path, bmp);*/
int SaveBitmap(char* path, Bitmap* bmp)
{int ret;FILE *fd;//检查路径是否正确int len = strlen(path) / sizeof(char);char ext[3];//check whether the path include the characters "bmp" at endstrncpy(ext, &path[len - 3], 3);if (!(ext[0] == 'b' && ext[1] == 'm' && ext[2] == 'p')){printf("Error(SaveBitmap): the extension of the file is not bmp.\n");return -1;}//打开文件fd=fopen(path,"wb");if(fd==0){printf("Error(SaveBitmap): can not open the image.\n");return -1;}//保存文件信息头 14字节fwrite(&(bmp->bmfh.bfType),sizeof(WORD),1,fd);fwrite(&(bmp->bmfh.bfSize),sizeof(DWORD),1,fd);fwrite(&(bmp->bmfh.bfReserved1),sizeof(WORD),1,fd);fwrite(&(bmp->bmfh.bfReserved2),sizeof(WORD),1,fd);fwrite(&(bmp->bmfh.bfOffBits),sizeof(DWORD),1,fd);//保存位图信息头 40字节fwrite(&(bmp->bmih.biSize),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biWidth),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biHeight),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biPlanes),sizeof(WORD),1,fd);fwrite(&(bmp->bmih.biBitCount),sizeof(WORD),1,fd);fwrite(&(bmp->bmih.biCompression),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biSizeImage),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biXPelsPerMeter),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biYPelsPerMeter),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biClrUsed),sizeof(DWORD),1,fd);fwrite(&(bmp->bmih.biClrImportant),sizeof(DWORD),1,fd);//如果为8位,则 保存调色板RGBQUAD pal[256];int i;if(bmp->bitCount==8){for(i=0;i<256;i++){pal[i].rgbBlue=i;pal[i].rgbGreen=i;pal[i].rgbRed=i;pal[i].rgbReserved=0;}if(fwrite(pal,sizeof(RGBQUAD)*256,1,fd)!=1){printf("Error(SaveBitmap): can not write Color Palette.\n");return -1;}}//保存图像数据ret=fwrite(bmp->imageData,bmp->imageSize,1,fd);if(ret!=1){printf("Error(SaveBitmap): can not save the pixel data.\n");return -1;}//关闭文件fclose(fd);return 0;
}#endif // BMP_H_INCLUDED
basicprocess.h
#ifndef BASICPROCESS_H_
#define BASICPROCESS_H_
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#include "bmp.h"
#include <math.h>
/*** <font color="#3f7f5f">位图图像基本处理函数 图像格式转换</font>*/
int RGB2Gray(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;BYTE r,g,b,gray;//检查图像格式是否合法if(src->bitCount!=24){printf("Error(RGB2Gray): the source image must be in RGB format.\n");return -1;}//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(RGB2Gray): can't create target image.\n");return -1;}//计算灰度数据for(i=0;i<src->height;i++){n=0;for(j=0;j<src->width*3;j++,n++){b=*(src->imageData+src->widthStep*(src->height-1-i)+j);j++;g=*(src->imageData+src->widthStep*(src->height-1-i)+j);j++;r=*(src->imageData+src->widthStep*(src->height-1-i)+j);gray=(r*19595 + g*38469 + b*7472) >> 16;*(dst->imageData+dst->widthStep*(dst->height-1-i)+n)=gray;}}return 0;
}/*** Gray2RGB** 使用方法:* bmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=ReadBitmap(path, bmp);* dstbmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=Gray2RGB(bmp,dstbmp);*/
int Gray2RGB(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;BYTE r;//检查图像格式是否合法if(src->bitCount!=8){printf("Error(Gray2RGB): the source image must be in gray scale.\n");return -1;}//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,24);if(ret==-1){printf("Error(Gray2RGB): can't create target image.\n");return -1;}//计算灰度数据for(i=0;i<src->height;i++){n=0;for(j=0;j<src->width;j++,n++){r=*(src->imageData+src->widthStep*(src->height-1-i)+j);*(dst->imageData+dst->widthStep*(dst->height-1-i)+n)=r;n++;*(dst->imageData+dst->widthStep*(dst->height-1-i)+n)=r;n++;*(dst->imageData+dst->widthStep*(dst->height-1-i)+n)=r;}}return 0;
}/*** Gray2BW 图像二值化** 使用方法:* bmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=ReadBitmap(path, bmp);* dstbmp=(Bitmap*)malloc(sizeof(Bitmap));* ret=Gray2BW(bmp,dstbmp);*/
int Gray2BW(Bitmap* src, Bitmap* dst, int threshold)
{int ret;int n=0,i,j;BYTE r;//检查图像格式是否合法if(src->bitCount!=8){printf("Error(Gray2BW): the source image must be in gray scale.\n");return -1;}//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(Gray2BW): can't create target image.\n");return -1;}//计算灰度数据for(i=0;i<src->height;i++){for(j=0;j<src->width;j++,n++){r=*(src->imageData+src->widthStep*(src->height-1-i)+j);if(r>=threshold){n=255;}else{n=0;}*(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=n;}}return 0;
}/*** rgb2hsv* r,g,b values are from 0 to 1* h = [0,360], s = [0,1], v = [0,1]* if s == 0, then h = -1 (undefined)* 使用方法:* rgb2hsv(0.2,0.3,0.3,&x,&y,&z);*/
void rgb2hsv(float R, float G, float B, float *H, float *S, float* V)
{float min, max, delta,tmp;tmp = R<G?R:G;min = tmp<B?tmp:B;tmp = R>G?R:G;max = tmp>B?tmp:B;*V = max; // vdelta = max - min;if( max != 0 )*S = delta / max; // selse{// r = g = b = 0 // s = 0, v is undefined*S = 0;*H = -1;return;}if( R == max )*H = ( G - B ) / delta; // between yellow & magentaelse if( G == max )*H = 2 + ( B - R ) / delta; // between cyan & yellowelse*H = 4 + ( R - G ) / delta; // between magenta & cyan(*H) *= 60; // degreesif( *H < 0 )(*H) += 360;
}/*** hsv2rgb* r,g,b values are from 0 to 1* h = [0,360], s = [0,1], v = [0,1]* if s == 0, then h = -1 (undefined)* 使用方法:* hsv2rgb(60,0.3,0.5,&x,&y,&z);
*/
void hsv2rgb(float H, float S, float V, float *R, float *G, float *B)
{int i;float f, p, q, t;if( S == 0 ){*R =*G = *B = V;return;}H /= 60; // sector 0 to 5i = floor( H );f = H - i; // factorial part of hp = V * ( 1 - S );q = V * ( 1 - S * f );t = V * ( 1 - S * ( 1 - f ) );switch( i ){case 0:*R = V;*G = t;*B = p;break;case 1:*R = q;*G = V;*B = p;break;case 2:*R = p;*G = V;*B = t;break;case 3:*R = p;*G = q;*B = V;break;case 4:*R = t;*G = p;*B = V;break;default: // case 5:*R = V;*G = p;*B = q;break;}
}/*** 直方图均衡化* 返回 0正确 -1错误*/
int HistEqualization(Bitmap* dstBmp, Bitmap* srcBmp)
{return 0;
}/** 中值滤波
*/int MedFilt(Bitmap* dstBmp, Bitmap* srcBmp)
{return 0;
}//平滑去噪int smooth(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;int sum;//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(Gray2BW): can't create target image.\n");return -1;}for(i=1;i<src->height-1;i++){for(j=1;j<src->width-1;j++){ sum = 0;//clear sumsum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j);sum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j+1);sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j);// 该点sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j+1);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j+1);*(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=(sum/9);//赋值给目标}}return 0;
}//膨胀int pengzhang(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;int r;//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(Gray2BW): can't create target image.\n");return -1;}for(i=1;i<src->height-1;i++){for(j=1;j<src->width-1;j++){ r=*(src->imageData+src->widthStep*(src->height-1-i)+j); if(r==0){*(dst->imageData+dst->widthStep*(dst->height-1-i-1)+j-1)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i-1)+j)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i-1)+j+1)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i)+j-1)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i)+j+1)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i+1)+j-1)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i+1)+j)=0;*(dst->imageData+dst->widthStep*(dst->height-1-i+1)+j+1)=0;}else *(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=r;}}return 0;
}int fushi(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;int r,sum;//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(Gray2BW): can't create target image.\n");return -1;}for(i=1;i<src->height-1;i++){for(j=1;j<src->width-1;j++){ r=*(src->imageData+src->widthStep*(src->height-1-i)+j); if(r==0){sum = 0;//clear sumsum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j);sum+=*(src->imageData+src->widthStep*(src->height-1-i-1)+j+1);sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j);// 该点sum+=*(src->imageData+src->widthStep*(src->height-1-i)+j+1);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j-1);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j);sum+=*(src->imageData+src->widthStep*(src->height-1-i+1)+j+1);if(sum>=255){*(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=255;}else {*(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=r;}}else *(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=255;}}return 0;
}int qufan(Bitmap* src, Bitmap* dst)
{int ret;int n=0,i,j;//为dst图像分配数据空间ret=CreateBitmap(dst,src->width,src->height,8);if(ret==-1){printf("Error(Gray2BW): can't create target image.\n");return -1;}for(i=1;i<src->height-1;i++){for(j=1;j<src->width-1;j++){ *(dst->imageData+dst->widthStep*(dst->height-1-i)+j)=255-*(src->imageData+src->widthStep*(src->height-1-i)+j);}}return 0;
}#endif /* BASICPROCESS_H_ */
效果图 中间过程图太多了,就不上了 这是最后的图。
废话不多说 直接show 代码 你们看吧。
数字图像处理-编程实现染色体计数 C语言实现相关推荐
- 关于《Java数字图像处理-编程技巧与应用实践》一书 源代码
关于<Java数字图像处理-编程技巧与应用实践>一书 源代码 本书所有的源代码我已经整理上传到华章图书的官方网站与 我自己的GITHUB上,本人GITHUB的地址如下: https://g ...
- C语言数字图像处理编程
C语言数字图像处理 读取bmp图像并做简单显示 bmp图像几何变换(移动,旋转,镜像,转置,缩放) 彩色图像转灰度图,灰度图反色 图像中值滤波与平均滤波 bmp图像锐化 图像的半影调和抖动技术 bmp ...
- VC数字图像处理编程
本文转自:http://www.rosoo.net/a/200909/7444.html 前 言 数字图像处理技术与理论是计算机应用的一个重要领域,许多工程应用都涉及到图像处理. 图是物体透射光或反射 ...
- 基于数字图像处理的小目标计数(一)
波点壁纸中圆点的计数 去年年末我学习了天津科技大学杨淑莹老师的<数字图像处理>课程,虽然课程有点老,但是内容还是比较经典的.课程最后有好几个数字图像处理的案例,都是基于Visual C++ ...
- VC数字图像处理编程讲座之六
图像文件格式 一般的图像文件结构主要都包含有文件头.文件体和文件尾等三部分 文件头: 软件ID.软件版本号.图像分辨率.图像尺寸.图像深度.彩色类型.编码方式.压缩算法 文件体:图像数据.彩色变换表 ...
- 数字图像处理 染色体计数 Python实现
目录 一.实验内容 二.实验步骤 三.代码 四.结果 一.实验内容 对于下面这幅图像,编程实现染色体计数,并附简要处理流程说明. 二.实验步骤 1.中值滤波 2.图像二值化 3.膨胀图像 4.腐蚀图像 ...
- python数字图像处理(1):环境安装与配置
一提到数字图像处理编程,可能大多数人就会想到matlab,但matlab也有自身的缺点: 1.不开源,价格贵 2.软件容量大.一般3G以上,高版本甚至达5G以上. 3.只能做研究,不易转化成软件. 因 ...
- 初始----python数字图像处理--:环境安装与配置
一提到数字图像处理编程,可能大多数人就会想到matlab,但matlab也有自身的缺点: 1.不开源,价格贵 2.软件容量大.一般3G以上,高版本甚至达5G以上. 3.只能做研究,不易转化成软件. 因 ...
- c语言3%10等于多少,[编程入门]数字的处理与判断-题解(C语言代码)
# 1009题-[编程入门]数字的处理与判断-题解(C语言描述) 本题解的最终解释权归本人所有,主要用于本班上同学更好的掌握本题的解题方法,同时更好的理解和掌握方法. ------------ ### ...
最新文章
- python培训深圳-深圳靠谱的Python培训
- 使用 python 3.6 和 Vmware WorkStation 构建一个小型虚拟局域网通讯程序
- vue 父组件与子组件之间的传值(主动传值)
- [css] 为什么说css的选择器一般不要超过三级?
- mysql my.cnf 配置建议
- adb启动app_adb命令实战十三步
- 各种厂商打开bios按键总汇
- 深入浅出MySQL crash safe
- redis的主从复制和高可用集群
- Leo2DNT(雷傲论坛转DiscuzNT)1.0转换程序发布
- 《Java编程规范学习笔记》
- 论文的总结与展望写作技巧
- 单招学计算机好学吗,单招没被录取学什么,计算机行业
- 今日头条号如何过原创
- Matlab 各种画图函数用法
- Error evaluating expression ‘xxxxx != null and xxxxxx!= ’
- 区块链的前世今生:为什么说区块链是即将到来的数字革命?
- yolov5手动标注的xml转txt
- IT客降级水果郎(转自牛人)
- 栈(stack) C语言实现 详解