Ask Your Question

Syafiq's profile - activity

2016-03-09 21:58:15 -0600 commented question Convert raw image into mosaic-image representation

It seem that i need to times 3 on img.col to make entire image is white

for (int x = 0; x < (img.cols*3); x++){
        for (int y = 0; y < img.rows; y++){
            img.at<uchar>(Point(x, y)) = 255;
        }
    }

why it should be like that..can someone give me clear explanation about this issue??

2016-03-09 21:28:07 -0600 commented question Convert raw image into mosaic-image representation

i have image test of 600x600 pixel..I was expecting it to cover the entire image in white, but unfortunately is not. right side image is not cover by white.

can somebody help me with this problem...i thought my loop is correct but i dont know why the output like that.i already stuck at my first step.. so how i can modify my code so the img.at<char> can read all pixel in image through column and follow by row.?

2016-03-09 21:26:34 -0600 commented question Convert raw image into mosaic-image representation

yeah @LBerger..actually this is my school project..

@sturkmen thanks...that actually output that i want...but actually i also need to reduce a pixel number such as every group of pixel is compress to become a pixel(tile) because my project use this image output for robot arm pick and place actual tile to become exactly like the image..then i think i need to go through each pixel through it's column follow by it's row and read and average pixel value one by one by using img.at<uchar>(Point(x,y)). But i have problem when i test to set value on pixel of image by using this code

for (int x = 0; x < img.cols; x++){
    for (int y = 0; y < img.rows; y++){
        img.at<uchar>(Point(x, y)) = 255;
    }
}
2016-03-09 21:13:32 -0600 answered a question Convert raw image into mosaic-image representation

yeah @LBerger..actually this is my school project..

@sturkmen thanks...that actually output that i want...but actually i also need to reduce a pixel number such as every group of pixel is compress to become a pixel(tile) because my project use this image output for robot arm pick and place actual tile to become exactly like the image..then i think i need to go through each pixel through it's column follow by it's row and read and average pixel value one by one by using img.at<uchar>(Point(x,y)). But i have problem when i test to set value on pixel of image by using this code

for (int x = 0; x < img.cols; x++){
    for (int y = 0; y < img.rows; y++){
        img.at<uchar>(Point(x, y)) = 255;
    }
}

i have image test of 600x600 pixel..I was expecting it to cover the entire image in white, but unfortunately is not. The result is like this:

image description

can somebody help me with this problem...i thought my loop is correct but i dont know why the output like that.i already stuck at my first step.. so how i can modify my code so the img.at<char> can read all pixel in image through column and follow by row.?

2016-03-07 01:25:22 -0600 received badge  Enthusiast
2016-02-24 02:44:11 -0600 received badge  Student (source)
2016-02-23 09:30:36 -0600 asked a question Convert raw image into mosaic-image representation

Hi, this is my first time using opencv and i'm beginner in C++. what i want to:

  1. Read an image.
  2. Convert image into tiles image.
  3. Read color value on each tile.

almost like figure below.

image description

I have through forum and i found out a few way that maybe can be use to do this. It is possible to split image into block first or using kernel and convolution concept to convert image into mosaic-represantation. or there is other way/function that is more direct and simple?