ruby_marks 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/ruby_marks/recognizer.rb +5 -1
- data/lib/ruby_marks/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -151,7 +151,7 @@ The result image should be like this one (note that all the groups are separated
|
|
151
151
|
[![Document Example](https://raw.github.com/andrerpbts/ruby_marks/master/assets/sheet_demo2_edge.png)](https://github.com/andrerpbts/ruby_marks/blob/master/assets/sheet_demo2_edge.png)
|
152
152
|
|
153
153
|
|
154
|
-
There's a method you can call to
|
154
|
+
There's a method you can call to help you to identify how the document is being recognized. This method return the image
|
155
155
|
with the showing where is the expected groups coordinates are, where are the actual groups coordinates, and where the marks
|
156
156
|
is being recognized in each group.
|
157
157
|
|
@@ -18,6 +18,9 @@ module RubyMarks
|
|
18
18
|
self.reset_document
|
19
19
|
@file = nil
|
20
20
|
@file_str = nil
|
21
|
+
@original_file = nil
|
22
|
+
@original_file_str = nil
|
23
|
+
|
21
24
|
@file = Magick::Image.read(file).first
|
22
25
|
@file = @file.quantize(256, Magick::GRAYColorspace)
|
23
26
|
@file = @file.threshold(@config.calculated_threshold_level)
|
@@ -26,10 +29,11 @@ module RubyMarks
|
|
26
29
|
@groups_detected = false
|
27
30
|
|
28
31
|
@groups.each_pair do |label, group|
|
32
|
+
group.marks = nil
|
29
33
|
group.marks = Hash.new { |hash, key| hash[key] = [] }
|
30
34
|
end
|
31
35
|
end
|
32
|
-
|
36
|
+
|
33
37
|
|
34
38
|
def reset_document
|
35
39
|
@current_position = {x: 0, y: 0}
|
data/lib/ruby_marks/version.rb
CHANGED