Ask Your Question

Madalasa's profile - activity

2016-11-02 00:41:21 -0600 commented question How to load single bit 3 channel image?

Any other way to read??

2016-11-02 00:20:08 -0600 commented question How to load single bit 3 channel image?

Tried to use IplImage img=cvLoadImage(filename,-1) but it is also not working

2016-11-02 00:17:54 -0600 commented question How to load single bit 3 channel image?

Unable to use libtiff properly..So is there any other way to access it

2016-11-02 00:08:24 -0600 commented question How to load single bit 3 channel image?

Bit depth is [0.0-1.0]

2016-11-02 00:06:22 -0600 commented question How to load single bit 3 channel image?

Image we only computed using ERDAS software. Image is converted to TOA(Top of Atmospheric reflectance)... Stored as tiff format

2016-11-02 00:05:32 -0600 commented question How to load single bit 3 channel image?

In matlab it is showing as single bit image

2016-11-02 00:04:12 -0600 received badge  Enthusiast
2016-11-01 23:41:44 -0600 asked a question How to load single bit 3 channel image?

Image is in the range [0-1].I tried to use Mat img=imread(filename,CV_LOAD_IMAGE_COLOR); But the rows are 0 and cols are 0 and channels as 3. So how to access it properly. when i'm using CV_LOAD_IMAGE_ANYDEPTH error is coming.

2016-10-26 07:09:04 -0600 commented question Here img is 16UC3... Comparing is wrong...Can someone help me with this

I want to compare all 3 channels with different values.. Channel 1 >50 && channel 2 > 60 && channels 3 >110 And i want to store the values in new CV_16UC3 matrix.

2016-10-26 05:28:17 -0600 asked a question Here img is 16UC3... Comparing is wrong...Can someone help me with this
Mat image(5620, 4894, CV_16UC3, Scalar(0, 0, 0));
for (int j = 0; j < Change_Detected.rows; j++)
{
    for (int l = 0; l < Change_Detected.cols; l++)
    {
        if (img.at<Vec3b>(i,j)>200)
        {
            image.at<Vec3b>(j, l)[0] = img.at<Vec3b>(j, l)[0];
            image.at<Vec3b>(j, l)[1] = img.at<Vec3b>(j, l)[1];
            image.at<Vec3b>(j, l)[2] = img.at<Vec3b>(j, l)[2];
        }
    }
}
2016-10-26 05:08:50 -0600 commented question How to perform SLIC for Mat using in built function?

Using VL i required

2016-10-26 04:04:06 -0600 asked a question How to perform SLIC for Mat using in built function?

vl_slic_segment(segmentation, img, width, height, channels, region, regularization, minRegion);

img is converted to 3d to 1d matrix, now how to convert to float to perform segmentation.

2016-10-26 03:33:58 -0600 commented question I want to convert 16UC3 image to 1 dimensional array?

image.at<ushort>(i,j)[0] is this way to access values...

2016-10-26 03:20:44 -0600 commented question I want to convert 16UC3 image to 1 dimensional array?

What is the correct way to access those values??

2016-10-26 01:59:45 -0600 asked a question I want to convert 16UC3 image to 1 dimensional array?

I'm unable to access the values in the matrix properly.

for (int i = 0; i < image.rows; i++)
    {
        for (int j = 0; j < image.cols; j++)
        {
            img[j + image.cols*i + image.cols*image.rows * 0] = image.at<cv::Vec3b>(i, j)[0];
            img[j + image.cols*i + image.cols*image.rows * 1] = image.at<cv::Vec3b>(i, j)[1];
            img[j + image.cols*i + image.cols*image.rows * 2] = image.at<cv::Vec3b>(i, j)[2];
        }
    }
2016-10-21 05:07:49 -0600 commented question How to read 10 bit tiff satellite image in opencv?

I cannot access it-- #include "tiffio.h"

2016-10-21 04:59:44 -0600 commented question How to read 10 bit tiff satellite image in opencv?

Same tif image which is in '.img' format giving 0 for channels,rows and columns. So how to access '.img' format.

2016-10-21 04:42:03 -0600 commented question How to read 10 bit tiff satellite image in opencv?

I have to read all the intensity values,i.e 3 bands(R,G,B).So how to access it? Original image is ".img" format.

2016-10-21 04:39:21 -0600 commented answer How to read 10 bit tiff satellite image in opencv?

How to read .img files

2016-10-21 04:33:25 -0600 commented question How to read 10 bit tiff satellite image in opencv?

Hey in ERDAS, ENVI,eCognition softwares image is showing that it is 3 bands image, i.e 3 channel.

2016-10-21 04:21:54 -0600 commented question How to read 10 bit tiff satellite image in opencv?

Image is in .img format. But Opencv is not reading properly, So i converted to tif format. Generally i have to do the segmentation, for each object i have to perform threshold operation. image.type() is 2. But my image is contains 3 channels. Max is using just to check the value. Not using in my program

2016-10-21 04:09:47 -0600 commented question How to read 10 bit tiff satellite image in opencv?

I need to perform some operations on the image, For every pixel... And what is the data type i have to use for "image.type". When i used int data type it gave output 2.

2016-10-21 04:01:26 -0600 commented question How to read 10 bit tiff satellite image in opencv?

This is not the complete code,Part of it...

2016-10-21 02:13:54 -0600 commented question How to read 10 bit tiff satellite image in opencv?

The image pixels are not reading..

2016-10-21 01:28:34 -0600 received badge  Editor (source)
2016-10-21 01:27:11 -0600 asked a question How to read 10 bit tiff satellite image in opencv?

Maximum pixel value of the tiff image is 481. But it is showing maximum is 1.So how to read properly.

#include <opencv2/core/core.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\nonfree\features2d.hpp>
#include <iostream>

using namespace std;
using namespace cv;

Mat IMG(5620, 4894, CV_8UC3, Scalar(0, 0, 0));
int main()
{
    /* Input Image of 4894*5620 size */
    Mat image = imread("C:\\Users\\IIST\\Desktop\\Madi\\NRSC_OCT\\a.tif",IMREAD_ANYDEPTH);
    //Mat image = imread("D:\\SC15M053\\PROGRAM AND OUTPUTS\\NRSC\\post_image\\53N07_cl.img", IMREAD_ANYDEPTH);
    int ch = image.channels();
    int R = image.rows;
    int C = image.cols;
    cout << "Channles : " << ch << endl << "Rows are : " << R << endl << "Cols are : " << C << endl;
    int max = image.at<Vec3b>(0, 0)[0];;
    //int max = image.at<Vec3b>(258, 519)[2];
    for (int i = 0; i < R; i++)
    {
        for (int j = 0; j < C; j++)
        {
            if (max < image.at<Vec3b>(i, j)[0])
                max = image.at<Vec3b>(i, j)[0];
        }
    }
    cout << "Maximum value of band  : " << max << endl;
    cin.get();
    return(0);
}

Exception: Unhandled exception at 0x000007FFFF05AEA8 in FirstOpencv2.exe: Microsoft C++ exception: cv::Exception at memory location 0x00000034A04EF4E0.