Tesseract
3.02
|
00001 00002 // File: blobgrid.h 00003 // Description: BBGrid of BLOBNBOX with useful BLOBNBOX-specific methods. 00004 // Copyright 2011 Google Inc. All Rights Reserved. 00005 // Author: rays@google.com (Ray Smith) 00006 // Created: Sat Jun 11 10:26:01 PST 2011 00007 // 00008 // Licensed under the Apache License, Version 2.0 (the "License"); 00009 // you may not use this file except in compliance with the License. 00010 // You may obtain a copy of the License at 00011 // http://www.apache.org/licenses/LICENSE-2.0 00012 // Unless required by applicable law or agreed to in writing, software 00013 // distributed under the License is distributed on an "AS IS" BASIS, 00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 // See the License for the specific language governing permissions and 00016 // limitations under the License. 00017 // 00019 00020 00021 #ifndef TESSERACT_TEXTORD_BLOBGRID_H_ 00022 #define TESSERACT_TEXTORD_BLOBGRID_H_ 00023 00024 #include "bbgrid.h" 00025 #include "blobbox.h" 00026 00027 CLISTIZEH(BLOBNBOX) 00028 00029 namespace tesseract { 00030 00031 typedef GridSearch<BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT> BlobGridSearch; 00032 00033 class BlobGrid : public BBGrid<BLOBNBOX, BLOBNBOX_CLIST, BLOBNBOX_C_IT> { 00034 public: 00035 BlobGrid(int gridsize, const ICOORD& bleft, const ICOORD& tright); 00036 virtual ~BlobGrid(); 00037 00038 // Inserts all the blobs from the given list, with x and y spreading, 00039 // without removing from the source list, so ownership remains with the 00040 // source list. 00041 void InsertBlobList(BLOBNBOX_LIST* blobs); 00042 }; 00043 00044 } // namespace tesseract. 00045 00046 #endif // TESSERACT_TEXTORD_BLOBGRID_H_