image-formats

Is there a function in MATLAB that converts a .raw file into a matrix?

青春壹個敷衍的年華 提交于 2019-12-04 05:50:45
问题 I want to import a .raw file into MATLAB as a matrix (frames x spatial x spectral). Is there a built-in function to do this? 回答1: If you're referring to a raw image file from a camera, I would check out the submission RAW Camera File Reader from Bryan White on the MathWorks File Exchange. 回答2: You can also read the file directly. But you'll need to convert it to DNG first. See this: http://blogs.mathworks.com/steve/2011/03/08/tips-for-reading-a-camera-raw-file-into-matlab/ 来源: https:/

How can I convert between RGB565 and RGB24 image formats in MATLAB?

£可爱£侵袭症+ 提交于 2019-12-04 04:42:10
I am getting an RGB matrix from a microprocessor that outputs an image in RGB565 format. I want to read this into MATLAB, convert it to RGB24 format, and output the image. How do I do this? You first have to read your data from the text file into a matrix in MATLAB. Since I don't know what format your text file is in, I can only suggest that you will probably need to use the function fscanf to read in all of your values (probably of type uint16 ), then you will likely have to reshape the values into an N-by-M image matrix using the function reshape . Let's assume you've done all that, and you

Save frame from TangoService_connectOnFrameAvailable

旧城冷巷雨未停 提交于 2019-12-02 11:58:36
How can I save a frame via TangoService_connectOnFrameAvailable() and display it correctly on my computer? As this reference page mentions, the pixels are stored in the HAL_PIXEL_FORMAT_YV12 format. In my callback function for TangoService_connectOnFrameAvailable, I save the frame like this: static void onColorFrameAvailable(void* context, TangoCameraId id, const TangoImageBuffer* buffer) { ... std::ofstream fp; fp.open(imagefile, std::ios::out | std::ios::binary ); int offset = 0; for(int i = 0; i < buffer->height*2 + 1; i++) { fp.write((char*)(buffer->data + offset), buffer->width); offset +

Getting enum names (e.g. CV_32FC1) of OpenCV image types?

时间秒杀一切 提交于 2019-11-30 06:31:06
问题 In the C++ interface to OpenCV, it seems easy enough to check the type of an image. If you have an image cv::Mat img = cv::imread("someImage.xyz") , you just do int theType = img.type() . However, as you would expect, calling img.type() just gives an integer, an not an enum name (e.g. CV_32FC1 ). Is there an easy way to print out the enum name (e.g. CV_32FC1 ) if I know the integer value of the OpenCV enum? 回答1: To my knowledge, such a function doesn't exist in OpenCV. I think you would be

How to convert all image format into .png format?

百般思念 提交于 2019-11-29 08:42:20
I am making a small application where I am receiving images from web-service. I am getting the image url. And the format of images is different different like .jpg,.gif,.png etc. And I want to save these images into my sandbox and later on show it into image view. To do this I am giving a self name and gave the extension to .png. But at the time of retrieving the .png images are shown but different one's are not shown. So can you give me any idea how to convert all images to .png format or any other approach to do this? Bazinga after you retrieve your images/url save them this way: NSData

Which Image Formats does JavaFX Support?

自作多情 提交于 2019-11-29 02:01:59
I am looking for a list of Image Types (latest) JavaFX supports, e.g. PNG, JPEG, TIFF. Different search engines did not help ... any idea where to start? More particulary I am interested in 16 Bit grayscale images (in different formats) and the rare supported jpg-lossless standard. The list below was generated based on the options that Fireworks and Photoshop allow one to Save As: plus a few selected formats by me considering what is commonly found and that have some support on ImageJ. Therefore the ✓ doesn't mean that the format is natively supported in ImageJ, but it means that it is

Getting enum names (e.g. CV_32FC1) of OpenCV image types?

∥☆過路亽.° 提交于 2019-11-28 19:22:55
In the C++ interface to OpenCV, it seems easy enough to check the type of an image. If you have an image cv::Mat img = cv::imread("someImage.xyz") , you just do int theType = img.type() . However, as you would expect, calling img.type() just gives an integer, an not an enum name (e.g. CV_32FC1 ). Is there an easy way to print out the enum name (e.g. CV_32FC1 ) if I know the integer value of the OpenCV enum? To my knowledge, such a function doesn't exist in OpenCV. I think you would be better off writing your own function to get those. A lot of switch cases but I guess it does the job. The

Website Image Formats: Choosing the right format for the right task

纵饮孤独 提交于 2019-11-28 03:33:48
When designing a website, what do you consider the best image format to use for a particular task? I always find myself in a dilemma when trying to figure out what format to use for a specific task...like for example, should I use .jpg all round? or, when and why should I use a .png? For example, taking Amazon 's website, they use .jpg for product images ( Example ), .gif for this transparent pixel ( Example ) and .png for their CSS Sprites ( Example ) On the other hand, Play.com use a .gif for their website logo ( Example ), but use .jpg for their website products (like Amazon) ( Example )

How to convert all image format into .png format?

泪湿孤枕 提交于 2019-11-28 01:56:48
问题 I am making a small application where I am receiving images from web-service. I am getting the image url. And the format of images is different different like .jpg,.gif,.png etc. And I want to save these images into my sandbox and later on show it into image view. To do this I am giving a self name and gave the extension to .png. But at the time of retrieving the .png images are shown but different one's are not shown. So can you give me any idea how to convert all images to .png format or

Which Image Formats does JavaFX Support?

时间秒杀一切 提交于 2019-11-27 16:23:01
问题 I am looking for a list of Image Types (latest) JavaFX supports, e.g. PNG, JPEG, TIFF. Different search engines did not help ... any idea where to start? More particulary I am interested in 16 Bit grayscale images (in different formats) and the rare supported jpg-lossless standard. 回答1: The list below was generated based on the options that Fireworks and Photoshop allow one to Save As: plus a few selected formats by me considering what is commonly found and that have some support on ImageJ.