Score
0
Watch 39 Star 49 Fork 11

tboox / hnrC

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
脱机手写数字识别系统,可以将手机拍摄的 多行多列的 手写数字 进行识别, 整个系统 实现了完整的 图像处理、特征提取、网络训练等 一系列算法, 每个阶段的各种算法 都有自己独有的算法优化,以提高识别率 spread retract

Clone or download
qimagescene.h 2.40 KB
Copy Edit Web IDE Raw Blame History
ruki authored 2013-07-02 14:09 . ...
#ifndef QIMAGESCENE_H
#define QIMAGESCENE_H
#include <QGraphicsScene>
#include <QList>
#include <QPainter>
#include <QPolygonF>
#include <QTime>
#include "prefix.h"
#include "imageconvector.h"
#include "qimage_painter.h"
//#include "sample_helper.h"
#include "sh_pp.h"
class QImageScene : public QGraphicsScene
{
Q_OBJECT
public:
QImageScene( QObject * parent = 0 );
public:
bool analyze();
void LoadImage(QString const& filename);
public:
pimages_info_row_type const& pimages_info_row() const { return m_pimages_info_row; }
pimages_info_row_type& pimages_info_row() { return m_pimages_info_row; }
protected:
void drawForeground(QPainter *painter, const QRectF &rect);
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent);
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent);
private:
void update_image();
public:
QImage& showedImage() { EXTL_ASSERT(NULL != m_showedImage); return *m_showedImage; }
QImage const& showedImage() const { EXTL_ASSERT(NULL != m_showedImage); return *m_showedImage; }
image_type& handledImage() { return m_handledImage; }
image_type const& handledImage() const { return m_handledImage; }
void handledImage(image_type const& image) { m_handledImage = image; }
void showImgs(scoped_buffer<image_type> const& imgs);
private slots:
// make gray
void gy_general();
void gy_stretch();
void gy_histogram();
void gy_part_histogram();
// smooth
void oh_mean_smooth();
// threshold
void th_global_basic_threshold();
void th_global_otsu_threshold();
void th_partial_basic_threshold();
void th_partial_otsu_threshold();
// denoising
void dn_median_denoising();
void dn_discrete_denoising();
// split
void cs_kmean_split();
void cs_fcm_split();
void cs_labeling_split();
// edge detect
void sobel();
void prewitt();
void kirsch();
void isotropic();
void marr();
// deskew
void deskew();
// thinning
void thinning();
// pre-process
void pp_preprocess();
private:
QImage* m_showedImage;
image_type m_handledImage;
pimages_info_row_type m_pimages_info_row;
bool m_is_pressed;
QPolygonF m_ploygon;
QTime m_release_time;
bool m_is_online;
};
#endif // QIMAGESCENE_H

Comment ( 0 )

Sign in for post a comment

C
1
https://gitee.com/tboox/hnr.git
git@gitee.com:tboox/hnr.git
tboox
hnr
hnr
master

Search