typedef struct quardresult_t
{
int seq;
char val;
}QuadResult;
#include <stdlib.h>
#include <iostream>
#include <vector>
#include<malloc.h>
#include<stdio.h>
#include <string.h>
#include <queue>
#include <math.h>
using namespace std;
/* 象限 */
typedef enum
{
TOP_RIGHT = 0,
TOP_LEFT,
BOTTOM_LEFT,
BOTTOM_RIGHT
}BLOCKNAME;
typedef unsigned char IMGTYPE;
class HeapNode
{
public:
HeapNode(IMGTYPE* image,int imageSize):_image(image),_imageSize(imageSize)
{
//cout<<"constructor"<<endl;
}
/*~HeapNode()
{
if(_image!=NULL)
{
delete _image;
_image=NULL;
}
}*/
IMGTYPE* _image;
int _imageSize;
bool isLeaf()
{
if(_imageSize==1) return true;
char pivot=_image[0];
bool flag=true;
for(int i=0;i<(_imageSize*_ima
图像的四叉树广度优先存储
最新推荐文章于 2023-02-18 16:05:57 发布
该博客介绍了一种使用四叉树对图像进行广度优先存储的方法,通过创建和处理堆节点来构建四叉树。文章详细展示了如何检查输入图像的合法性,并提供了将二维ASCII艺术图片映射为一维数组,然后创建四叉树并获取处理结果的函数。
摘要由CSDN通过智能技术生成