Refactoring

Notice the labelRegions method in ImageRegions.java has two checkstyle errors: method length and cyclomatic complexity. You must refactor this method to resolve these checkstyle issues. However, you are not allowed to extract and employ helper methods! The labelRegions can be simplified to a more compact form. (Hint: it currently performs unnecessary work!)