Ask Your Question

KOPII's profile - activity

2020-11-03 04:20:00 -0600 received badge  Popular Question (source)
2020-07-02 11:41:23 -0600 received badge  Taxonomist
2013-03-11 04:31:36 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Will you review my code if it's not optimized???

2013-03-11 01:18:39 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Finally I used union approach and got the result successfully. Anyway I must say thanks to you and hope you will be guiding me in future... :)

2013-03-07 23:51:24 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Unfortunately I need to do this... :(

2013-03-06 06:53:37 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

I have successfully received number of rows and columns. But here comes a genuine issue i.e. in the pixel array returned , there is one byte for each pixel where as there should be one bit for a pixel which is the requirement of the printer... Please help me fix it.. Thanks

2013-03-06 00:09:27 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Yes I have to send these bytes to a POS printer. It was a mistake by me that I have written network instead of POS printer. And I am sorry for that. I just need to know that how I can get the rows and columns of a spacific image because I am able to print a bitmap whose rows, columns and pixel array is known to me. I have obtained the pixel array successfully as you guided me. Now I am just left with number of rows and columns to be known for a specific image. Thanks

2013-03-05 06:04:24 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

I don't have any issue in printing by POS commands. I have successfully done it. I just need to convert my bitmap to array of bytes now and yes I must need the rows and columns because that are used as the parameters for the printer's bitmap printing command... :)

2013-03-05 05:52:10 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Means there is no output at the console for the above code ...

2013-03-05 05:10:57 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Actually its a Thermal Printer working on POS Commands. It gets the bitmap as array of bytes. Actually the data is sent byte by byte to the printer.

2013-03-05 04:59:48 -0600 received badge  Supporter (source)
2013-03-05 04:59:10 -0600 commented answer Bitmap to hex array conversion in c++ using opencv

Thanks alot sir. It works fine. One thing I further need to know is that how may I get the rows and columns of that particular image??? I am doing it as :

int roww= image.rows;
int colm=image.cols;
cout<<"Rows ="<<roww<<endl;
cout<<"Columns ="<<colm<<endl;

But its not working ... :(

2013-03-05 04:13:44 -0600 asked a question cv::Mat to array of bytes in OpenCV

I am trying to convert a Mat object to a byte array to transfer over a network. How do I achieve this? I am trying to do this in c /c++ using OpenCV and NetBeans IDE.

2013-02-27 23:06:37 -0600 asked a question Bitmap to hex array conversion in c++ using opencv

I am new to OpenCV. I have to convert a monochrome bitmap to a one dimensional array. What I have done so far is that I have read the image file and shown it in a window.

#include <cv.h>
#include <highgui.h>
using namespace cv;
int main( int argc, char** argv )
{
cv::Mat image;
image = imread("imaje.bmp");
if(image.empty())
return 0;
cv::imshow("Image", image);
cv::waitKey();
return 0; 
}

The image array is stored in variable named as "image" . I need to get that variable in some text format as I need to send these bytes to a printer. Please guide me how should I proceed ?? Thanks