~matthill/openalpr/master

« back to all changes in this revision

Viewing changes to src/openalpr/ocr/segmentation/segmentationgroup.cpp

  • Committer: Matt Hill
  • Date: 2016-07-02 14:27:26 UTC
  • Revision ID: git-v1:b6469b015e923bf7d15b5c823964d29c1b860f17
Moved segmentation code to inside OCR

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2015 OpenALPR Technology, Inc.
 
3
 * Open source Automated License Plate Recognition [http://www.openalpr.com]
 
4
 *
 
5
 * This file is part of OpenALPR.
 
6
 *
 
7
 * OpenALPR is free software: you can redistribute it and/or modify
 
8
 * it under the terms of the GNU Affero General Public License
 
9
 * version 3 as published by the Free Software Foundation
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU Affero General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Affero General Public License
 
17
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
#include "segmentationgroup.h"
 
21
 
 
22
namespace alpr
 
23
{
 
24
 
 
25
  SegmentationGroup::SegmentationGroup()
 
26
  {
 
27
 
 
28
  }
 
29
 
 
30
  SegmentationGroup::~SegmentationGroup()
 
31
  {
 
32
 
 
33
  }
 
34
 
 
35
  void SegmentationGroup::add(int segmentID)
 
36
  {
 
37
    this->segmentIDs.push_back(segmentID);
 
38
  }
 
39
 
 
40
  bool SegmentationGroup::equals(SegmentationGroup otherGroup)
 
41
  {
 
42
    if (segmentIDs.size() != otherGroup.segmentIDs.size())
 
43
      return false;
 
44
 
 
45
    for (int i = 0; i < segmentIDs.size(); i++)
 
46
    {
 
47
      if (otherGroup.segmentIDs[i] != segmentIDs[i])
 
48
        return false;
 
49
    }
 
50
 
 
51
    return true;
 
52
  }
 
53
  
 
54
}
 
 
b'\\ No newline at end of file'