35 #include "modules/perception/lidar/detector/ncut_segmentation/common/graph_felzenszwalb/image.h" 36 #include "modules/perception/lidar/detector/ncut_segmentation/common/graph_felzenszwalb/imutil.h" 37 #include "modules/perception/lidar/detector/ncut_segmentation/common/graph_felzenszwalb/misc.h" 40 namespace perception {
46 int width = input->
width();
47 int height = input->
height();
49 for (
int y = 0; y < height; y++) {
50 for (
int x = 0; x < width; x++) {
52 imRef(input, x, y).g * GREEN_WEIGHT +
59 int width = input->
width();
60 int height = input->
height();
62 for (
int y = 0; y < height; y++) {
63 for (
int x = 0; x < width; x++) {
72 int width = input->
width();
73 int height = input->
height();
75 for (
int y = 0; y < height; y++) {
76 for (
int x = 0; x < width; x++) {
83 int width = input->
width();
84 int height = input->
height();
86 for (
int y = 0; y < height; y++) {
87 for (
int x = 0; x < width; x++) {
94 int width = input->
width();
95 int height = input->
height();
100 float scale = std::numeric_limits<unsigned char>::max() / (max - min);
101 for (
int y = 0; y < height; y++) {
102 for (
int x = 0; x < width; x++) {
105 val, (
uchar)0, (
uchar)std::numeric_limits<unsigned char>::max());
116 int width = input->
width();
117 int height = input->
height();
119 for (
int y = 0; y < height; y++) {
120 for (
int x = 0; x < width; x++) {
128 int width = input->
width();
129 int height = input->
height();
135 std::numeric_limits<unsigned char>::max() /
static_cast<float>(max - min);
136 for (
int y = 0; y < height; y++) {
137 for (
int x = 0; x < width; x++) {
140 val, (
uchar)0, (
uchar)std::numeric_limits<unsigned char>::max());
152 int width = input->
width();
153 int height = input->
height();
159 std::numeric_limits<unsigned char>::max() /
static_cast<float>(max - min);
160 for (
int y = 0; y < height; y++) {
161 for (
int x = 0; x < width; x++) {
164 val, (
uchar)0, (
uchar)std::numeric_limits<unsigned char>::max());
int height() const
Definition: image.h:55
Image< uchar > * image_long2uchar(Image< uint32_t > *input, uint32_t min, uint32_t max)
Definition: imconv.h:126
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Image< uchar > * image_rgb2gray(Image< rgb > *input)
Definition: imconv.h:45
int width() const
Definition: image.h:52
T bound(const T &x, const T &min, const T &max)
Definition: misc.h:60
void min_max(Image< T > *im, T *ret_min, T *ret_max)
Definition: imutil.h:42
Image< uchar > * image_short2uchar(Image< uint16_t > *input, uint16_t min, uint16_t max)
Definition: imconv.h:150
Image< float > * image_uchar2float(Image< uchar > *input)
Definition: imconv.h:71
Image< uchar > * image_float2uchar(Image< float > *input, float min, float max)
Definition: imconv.h:93
Image< float > * image_int2float(Image< int > *input)
Definition: imconv.h:82
const double BLUE_WEIGHT
Definition: imconv.h:44
const double GREEN_WEIGHT
Definition: imconv.h:43
Image< rgb > * image_gray2rgb(Image< uchar > *input)
Definition: imconv.h:58
unsigned char uchar
Definition: misc.h:38
Image< uint32_t > * image_uchar2long(Image< uchar > *input)
Definition: imconv.h:115
#define imRef(im, x, y)
Definition: image.h:68
const double RED_WEIGHT
Definition: imconv.h:42