<commit_before>/*
 * GridMapCvConverter.hpp
 *
 *  Created on: Apr 14, 2016
 *      Author: <NAME>
 *	 Institute: ETH Zurich, Autonomous Systems Lab
 */

#pragma once

#include <grid_map_core/grid_map_core.hpp>

// OpenCV
#include <cv_bridge/cv_bridge.h>

// STD
#include <iostream>

namespace grid_map {

/*!
 * Conversions between grid maps and OpenCV images.
 */
class GridMapCvConverter
{
 public:
  /*!
   * Default constructor.
   */
  GridMapCvConverter();

  /*!
   * Destructor.
   */
  virtual ~GridMapCvConverter();

  /*!
   * Initializes the geometry of a grid map from an image. This changes
   * the geometry of the map and deletes all contents of the layers!
   * @param[in] image the image.
   * @param[in] resolution the desired resolution of the grid map [m/cell].
   * @param[out] gridMap the grid map to be initialized.
   * @param[in](optional) position the position of the grid map.
   * @return true if successful, false otherwise.
   */
  static bool initializeFromImage(const cv::Mat& image, const double resolution,
                                  grid_map::GridMap& gridMap, const grid_map::Position& position)
  {<commit_msg>Remove constructor and destructor declaration in GridMapCvConverter<commit_after>/*
 * GridMapCvConverter.hpp
 *
 *  Created on: Apr 14, 2016
 *      Author: <NAME>
 *	 Institute: ETH Zurich, Autonomous Systems Lab
 */

#pragma once

#include <grid_map_core/grid_map_core.hpp>

// OpenCV
#include <cv_bridge/cv_bridge.h>

// STD
#include <iostream>

namespace grid_map {

/*!
 * Conversions between grid maps and OpenCV images.
 */
class GridMapCvConverter
{
 public:
  /*!
   * Initializes the geometry of a grid map from an image. This changes
   * the geometry of the map and deletes all contents of the layers!
   * @param[in] image the image.
   * @param[in] resolution the desired resolution of the grid map [m/cell].
   * @param[out] gridMap the grid map to be initialized.
   * @param[in](optional) position the position of the grid map.
   * @return true if successful, false otherwise.
   */
  static bool initializeFromImage(const cv::Mat& image, const double resolution,
                                  grid_map::GridMap& gridMap, const grid_map::Position& position)
  {
{'fraction_non_alphanumeric': 0.09955357142857142, 'fraction_numerical': 0.005357142857142857, 'mean_word_length': 3.2362948960302456, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6956454', 'n_tokens_mistral': 691, 'n_tokens_neox': 670, 'n_words': 232}