converting mat to vx\_image and back
hi everyone,

i am trying to convert a mat image to a vx\_image, however, i keep getting a weird error.

here is my code:

vector<mat> tovisionworks( mat cv\_left, mat cv\_right )

{

cvtcolor(cv\_left, cv\_left, cv::color\_rgb2gray);

cvtcolor(cv\_right,cv\_right, cv::color\_rgb2gray);

mat cv\_lef…
hi,

i can compile your code without error.

could you help to double check your makefile and environment?

environment is set by jetpack2.3.1

topic\_988388.cpp

#include "nvxio/application.hpp"

#include "nvx/nvx\_opencv\_interop.hpp"

#include <opencv2/imgproc/imgproc.hpp>

std::vector<cv::mat> tovisi…
Have a look at this video that explains how to get the raw data from an F200, and convert the images into an OpenCV Mat object:


<https://www.youtube.com/watch?v=wIkIdjN6Oyw>


And here is the conversion shown in the video:



```
cv::Mat PXCImage2CVMat(PXCImage *pxcImage, PXCImage::PixelFormat format)
{
    PXCImage::ImageData data;
    pxcImage->AcquireAccess(PXCImage::ACCESS\_READ, format, &data);

    int width = pxcImage->QueryInfo().width;
    int height = pxcImage->QueryInfo().height;

    if(!format)
        format = pxcImage->QueryInfo().format;

    int type;
    if(format == PXCImage::PIXEL\_FORMAT\_Y8)
        type = CV\_8UC1;
    else if(format == PXCImage::PIXEL\_FORMAT\_RGB24)
        type = CV\_8UC3;
    else if(format == PXCImage::PIXEL\_FORMAT\_DEPTH\_F32)
        type = CV\_32FC1;

    cv::Mat ocvImage = cv::Mat(cv::Size(width, height), type, data.planes[0]);

    pxcImage->ReleaseAccess(&data);
    return ocvImage;
}
```

 




[View solution in original post](/t5/Software-Archive/converting-PXCImage-to-Mat-format/m-p/1090766#M65212) Hi, I had a play around with it and managed to resolve it. When you download a picture from stock some are downloaded as a vector file. If you click on settings you can change it to download as a jpeg file.  This worked for me.  Cheers seek and tell are still required.

see here: <https://docs.lvgl.io/latest/en/html/overview/file-system.html#use-drivers-for-images> this is my first time digging into the processing source code so i hope this helps. the problem you are facing is more of a java problem though than a processing one.

by extending pgraphics you would have to replace the renderer implementations to inherit from your subclass(tgraphics) and not pgrap… it's not clear what it is you want as an output. if it's a row vector, there's no concatenation involved, you just simply reshape your matrix:
a = [0 1 1 1;
 1 0 1 0;
 1 0 0 1]
 v = reshape(a, 1, []) %reshape a into one row. since matlab is column major, this is done column-wise [@anna duraim38716857](https://community.adobe.com/t5/user/viewprofilepage/user-id/10648885) 
Unfortunatly you script cannot work.
 
Here is a working variant with remove the pathPoint[3] of the created rectangle
// Set color values for the CMYK object
var cmykCol = new CMYKColor();
cmykCol.black = 100.0;
cmykCol.cyan = 0.0;
cmykCol.magenta = 0.0;
cmykCol.yellow = 0;

var myDocument = app.activeDocument;
var artLayer = myDocument.layers.add()

var rect1 = artLayer.pathItems.rectangle( -449.855743408203,815.611206054688, 14.173, 8.504 );
rect1.fillColor = cmykCol;
re... duplicate of

[image]

[there was an error while trying to load the gem 'octokit'](https://travis-ci.community/t/there-was-an-error-while-trying-to-load-the-gem-octokit/6708) [linux](/c/environments/linux)

i don’t know what happend, and who can help me.

<https://travis-ci.com/jd-ftf/wot-design-mini/builds/142953099>
[[image]](https://aws1.discourse-cdn.com/business4/uploads/travis_ci/original/2x/6/6f9df34499e7f048c9ff9d0d369c1a4a450f4e1b.png "image") [Layer Sequentially From left to Right](https://community.adobe.com/t5/photoshop/layer-sequentially-from-left-to-right/td-p/12014433) The Photoshop **.raw**format has nothing to do with raw files. (as in raw files from digital cameras)


It's a special format for transferring images between applications and computer platforms, and is most likely not something you want to use. See  <https://helpx.adobe.com/photoshop/using/file-formats.html>


And you cannot convert tiff files to raw files, so just leave them as tiffs. Try this [LINK.](https://apps.autodesk.com/ACD/en/Detail/HelpDoc?appId=4545979311403124726&appLang=en&os=Win32_64)



Autocad has a plug in that looks like it will do the conversion for you.