Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

0.8.7 pre-release

git-svn-id: http://yagf.googlecode.com/svn/trunk@166 bb55e26e-657b-11de-982f-55b50260c994
  • Loading branch information...
commit e2ea7761b56e03fc68c5ec10c3ed0c131bc38b8b 1 parent 81b1b20
andrei.borovsky@gmail.com authored
View
10 CMakeLists.txt
@@ -2,11 +2,11 @@ project(yagf C CXX)
cmake_minimum_required(VERSION 2.6.0)
set (CMAKE_IN_SOURCE_BUILD TRUE)
set(SOURCES src/main.cpp src/mainform.cpp src/qgraphicsinput.cpp src/utils.cpp src/FileChannel.cpp src/spellchecker.cpp src/FileToolBar.cpp src/BlockAnalysis.cpp src/PageAnalysis.cpp
- src/SkewAnalysis.cpp src/CCAnalysis.cpp src/qxtgraphicsproxywidget.cpp src/popplerdialog.cpp src/pdfextractor.cpp src/pdf2ppt.cpp)
+ src/SkewAnalysis.cpp src/CCAnalysis.cpp src/qxtgraphicsproxywidget.cpp src/popplerdialog.cpp src/pdfextractor.cpp src/pdf2ppt.cpp src/ghostscr.cpp src/configdialog.cpp)
set(INT_SOURCES src/preload.c)
-set(UIS src/mainform.ui src/popplerdialog.ui)
+set(UIS src/mainform.ui src/popplerdialog.ui src/configdialog.ui)
set(MOC_HEADERS src/mainform.h src/FileChannel.h src/qgraphicsinput.h src/FileToolBar.h src/qxtgraphicsproxywidget.h src/qxtgraphicsview.h
- src/popplerdialog.h src/pdfextractor.h src/pdf2ppt.h)
+ src/popplerdialog.h src/pdfextractor.h src/pdf2ppt.h src/configdialog.h)
set (yagf_RCCS src/yagf.qrc)
set(QM_FILES yagf_ru.qm yagf_lt.qm yagf_de.qm yagf_pl.qm yagf_uk.qm)
set (LIB_PATH_SUFFIX )
@@ -56,10 +56,10 @@ set(CPACK_BINARY_TGZ OFF)
set(CPACK_BINARY_TZ OFF)
set(CPACK_BINARY_TBZ2 OFF)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Graphical front-end for cuneiform OCR tool")
-set(CPACK_PACKAGE_VERSION 0.8.6)
+set(CPACK_PACKAGE_VERSION 0.8.7)
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "8")
-set(CPACK_PACKAGE_VERSION_PATCH "6")
+set(CPACK_PACKAGE_VERSION_PATCH "7")
set(CPACK_STRIP_FILES bin/yagf bin/libyagfpreload)
set(CPACK_SOURCE_TBZ2 "OFF")
set(CPACK_SOURCE_TGZ "ON")
View
4 ChangeLog
@@ -1,3 +1,7 @@
+* Sun Aug 28 2011 Andrei Borovsky <anb@symmetrica.net> - 0.8.7
+- Tesseract support added
+- PDF import added
+- Dictionary selection bug fixed
* Sun Feb 20 2011 Andrei Borovsky <anb@symmetrica.net> - 0.8.6
- Some bugs fixed
- The default recognition language is now set according to the user's locale
View
9 DESCRIPTION
@@ -1,12 +1,13 @@
-YAGF is a graphical front-end for cuneiform OCR tool.
+YAGF is a graphical front-end for cuneiform and tesseract OCR tools.
With YAGF you can open already scanned image files or obtain new images via XSane (scanning results are automatically passed to YAGF).
Once you have a scanned image you can prepare it for recognition, select particular image areas for recognition, set the recognition language and so no.
Recognized text is displayed in a editor window where it can be corrected, saved to disk or copied to clipboard.
YAGF also provides some facilities for a multi-page recognition (see the online help for more details).
Building YAGF requires:
- qt4 development tools version > 4.32
+ qt4 development tools version > 4.5
libaspell development package
Running YAGF requires:
- Qt 4.2 or later, aspell
-Of course it is desirable to have xsane installed.
+ Qt 4.5 or later, aspell
+Of course it is desirable to have xsane installed.
+PDFimport is done using either pdftoppm or gs utilities. Make sure at least one of these is installed if you are going to recognize text from PDFs.
View
7 src/configdialog.cpp
@@ -32,7 +32,10 @@ int ConfigDialog::selectedEngine()
void ConfigDialog::setTessDataPath(const QString &value)
{
- if (value.isEmpty()) {
+ ui->lineEdit->setText(value);
+}
- }
+QString ConfigDialog::tessdataPath()
+{
+ return ui->lineEdit->text();
}
View
12 src/configdialog.ui
@@ -6,12 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
+ <width>344</width>
<height>237</height>
</rect>
</property>
<property name="windowTitle">
- <string>Dialog</string>
+ <string>OCR Settings</string>
+ </property>
+ <property name="windowIcon">
+ <iconset resource="yagf.qrc">
+ <normaloff>:/yagf.png</normaloff>:/yagf.png</iconset>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
@@ -96,7 +100,9 @@
</item>
</layout>
</widget>
- <resources/>
+ <resources>
+ <include location="yagf.qrc"/>
+ </resources>
<connections>
<connection>
<sender>buttonBox</sender>
View
19 src/mainform.cpp
@@ -66,8 +66,9 @@
#include "pdfextractor.h"
#include "pdf2ppt.h"
#include "ghostscr.h"
+#include "configdialog.h"
-const QString version = "0.8.6";
+const QString version = "0.8.7";
const QString outputBase = "output";
const QString outputExt = ".txt";
@@ -295,6 +296,20 @@ void MainForm::findTessDataPath()
return;
}
+void MainForm::showConfigDlg()
+{
+ ConfigDialog dialog(this);
+ if (selectedEngine == UseCuneiform)
+ dialog.setSelectedEngine(0);
+ else
+ dialog.setSelectedEngine(1);
+ dialog.setTessDataPath(tessdataPath);
+ if (dialog.exec()) {
+ selectedEngine = dialog.selectedEngine() == 0 ? UseCuneiform : UseTesseract;
+ tessdataPath = dialog.tessdataPath();
+ }
+}
+
void MainForm::importPDF()
{
if (!pdfx) {
@@ -986,7 +1001,7 @@ void MainForm::showAboutDlg()
{
QPixmap icon;
icon.load(":/yagf.png");
- QMessageBox aboutBox(QMessageBox::NoIcon, trUtf8("About YAGF"), trUtf8("<p align=\"center\"><b>YAGF - Yet Another Graphical Front-end for cuneiform</b></p><p align=\"center\">Version %1</p> <p align=\"center\">Ⓒ 2009-2011 Andrei Borovsky</p> This is a free software distributed under GPL v3. Visit <a href=\"http://symmetrica.net/cuneiform-linux/yagf-en.html\">http://symmetrica.net/cuneiform-linux/yagf-en.html</a> for more details.").arg(version), QMessageBox::Ok);
+ QMessageBox aboutBox(QMessageBox::NoIcon, trUtf8("About YAGF"), trUtf8("<p align=\"center\"><b>YAGF - Yet Another Graphical Front-end for cuneiform and tesseract OCR engines</b></p><p align=\"center\">Version %1</p> <p align=\"center\">Ⓒ 2009-2011 Andrei Borovsky</p> This is a free software distributed under GPL v3. Visit <a href=\"http://symmetrica.net/cuneiform-linux/yagf-en.html\">http://symmetrica.net/cuneiform-linux/yagf-en.html</a> for more details.").arg(version), QMessageBox::Ok);
aboutBox.setIconPixmap(icon);
QList<QLabel *> labels = aboutBox.findChildren<QLabel *>();
for (int i = 0; i < labels.count(); i++) {
View
1  src/mainform.h
@@ -91,6 +91,7 @@ private slots:
void unalignButtonClicked();
void hideToolBar();
void importPDF();
+ void showConfigDlg();
void addPDFPage(QString pageName);
void finishedPDF();
protected:
View
32 src/mainform.ui
@@ -105,7 +105,14 @@
<addaction name="actionOnlineHelp"/>
<addaction name="actionAbout"/>
</widget>
+ <widget class="QMenu" name="menu_Settings">
+ <property name="title">
+ <string>&amp;Settings</string>
+ </property>
+ <addaction name="actionOCR_Settings"/>
+ </widget>
<addaction name="menuFile"/>
+ <addaction name="menu_Settings"/>
<addaction name="menu_Help"/>
</widget>
<widget class="QToolBar" name="toolBar">
@@ -489,6 +496,14 @@
<string>Import pages from PDF documents</string>
</property>
</action>
+ <action name="actionOCR_Settings">
+ <property name="text">
+ <string>OCR Settings</string>
+ </property>
+ <property name="toolTip">
+ <string>Set up the OCR parameters</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
@@ -613,6 +628,22 @@
</hint>
</hints>
</connection>
+ <connection>
+ <sender>actionOCR_Settings</sender>
+ <signal>triggered()</signal>
+ <receiver>MainWindow</receiver>
+ <slot>showConfigDlg()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>959</x>
+ <y>568</y>
+ </hint>
+ </hints>
+ </connection>
</connections>
<slots>
<slot>rotateCWButtonClicked()</slot>
@@ -622,5 +653,6 @@
<slot>decreaseButtonClicked()</slot>
<slot>hideToolBar()</slot>
<slot>importPDF()</slot>
+ <slot>showConfigDlg()</slot>
</slots>
</ui>
View
6 yagf.spec
@@ -9,19 +9,19 @@
# norootforbuild
Name: yagf
-Version: 0.8.6
+Version: 0.8.7
Release: 1
URL: http://symmetrica.net/cuneiform-linux/yagf-ru.html
License: GPLv3+
Source0: %{name}-%{version}.tar.gz
Group: Productivity/Graphics/Other
-Summary: Graphical frontend for Cuneiform OCR tool
+Summary: Graphical frontend for Cuneiform and Tesseract OCR tools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: libqt4-devel cmake update-desktop-files fdupes
Requires: libqt4 >= 4.5
%description
-YAGF is a graphical front-end for Cuneiform OCR tool.
+YAGF is a graphical front-end for Cuneiform and Tesseract OCR tools.
With YAGF you can open already scanned image files or obtain new images via
XSane (scanning results are automatically passed to YAGF).
Once you have a scanned image you can prepare it for recognition, select
Please sign in to comment.
Something went wrong with that request. Please try again.