xiAPI:更改线程调度程序失败,检查实时优先级的用户限制

xiAPI: Failed to change thread scheduler, check user limit for realtime priority

尝试使用 Nvidia Jetson TK1(# R21(发布),修订版:3.0)操作 Ximea MQ013CG-ON USB 3.0 型相机。

当我尝试 运行 OpenCV installation information 中的示例 opencv_test.cpp 代码时:

#include "cv.h" 
#include "highgui.h" 
#include <stdio.h>  
// A Simple Camera Capture Framework 
int main() 
{
   CvCapture* capture = cvCaptureFromCAM( CV_CAP_XIAPI );
   if ( !capture ) {
     fprintf( stderr, "ERROR: capture is NULL \n" );
     getchar();
     return -1;
   }
   // Create a window in which the captured images will be presented
   cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
   // Show the image captured from the camera in the window and repeat
   while ( 1 ) {
     // Get one frame
     IplImage* frame = cvQueryFrame( capture );
     if ( !frame ) {
       fprintf( stderr, "ERROR: frame is null...\n" );
       getchar();
       break;
     }
     cvShowImage( "mywindow", frame );
     // Do not release the frame!
     //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
     //remove higher bits using AND operator
     if ( (cvWaitKey(10) & 255) == 27 ) break;
   }
   // Release the capture device housekeeping
   cvReleaseCapture( &capture );
   cvDestroyWindow( "mywindow" );
   return 0;
}

(运行 通过):

g++ -I/usr/local/include/opencv opencv_test.cpp -lopencv_highgui
LD_LIBRARY_PATH=/usr/local/lib ./a.out

我收到以下错误消息:

xiAPI: XIMEA Camera API V4.05.65
xiAPI: Adding camera context: dwID=14510651  ptr=B2AE4000 processID=00005A09
xiAPI: Create handles 1 Process 00005A09
xiAPI: Enable sensor
xiAPI: ENABLE SENSOR
xiAPI: SetDataRate bandwidth 3180; real band 3180; Freq 62; XSM 0
xiAPI: Time needed to read BPL:83ms
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: Successfully parsed BPL file, 447 total corrected pixels
xiAPI: SetGPIO 1 set to 8
xiAPI: SetDataRate bandwidth 3180; real band 3180; Freq 62; XSM 0
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: SetGPIO 1 set to 0
xiAPI: AutoSetBandwidth measurement
xiAPI: CalculateResources : Context B2AE4000 ID 14510651 m_maxBytes=1024 m_maxBufferSize=1048576
xiAPI: Failed to change thread scheduler, check user limit for realtime priority.
xiAPI: AutoSetBandwidth measured 3083Mbps. Safe margin 10% will be used.
xiAPI: Current bandwidth limit auto-set to 2774 Mbps (min:408Mbps,max:3083Mbps)
xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 62; XSM 0
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 62; XSM 0
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: DISABLE SENSOR
xiAPI: ENABLE SENSOR
xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 54; XSM 10
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: SetDataRate bandwidth 2774; real band 2774; Freq 54; XSM 10
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
xiAPI: CalculateResources : Context B2AE4000 ID 14510651 m_maxBytes=1024 m_maxBufferSize=1048576
xiAPI: StartVideoStream
xiAPI: Failed to change thread scheduler, check user limit for realtime priority.
xiAPI: WorkerThread is up
xiAPI: ERROR: pixel -7x323 has no correction pixel!
xiAPI: ERROR: pixel -7x1018 has no correction pixel!
xiAPI: ERROR: 2 pixels in list without any correction!
Aborted

我也尝试过 xiAPI 示例,然后根据光线强度出现黑屏或白屏。可能是什么问题?谢谢。

更多信息:

已根据说明安装XIMEA Linux Software Package, and OpenCV。使用 s-link USB 4 端口 3.0 集线器。

lsusb 的输出:

Bus 002 Device 006: ID 20f7:3001  
Bus 001 Device 006: ID 09da:000a A4 Tech Co., Ltd Optical Mouse Opto 510D
Bus 001 Device 005: ID 046e:52cc Behavior Tech. Computer Corp. 
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

USB 视图中的信息:

www.ximea.com
Manufacturer: XIMEA
Speed: unknown
USB Version:  3.00
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 9
Number of Configurations: 1
Vendor Id: 20f7
Product Id: 3001
Revision Number:  0.00

Config Number: 1
    Number of Interfaces: 1
    Attributes: 80
    MaxPower Needed: 400mA

    Interface Number: 0
        Name: (none)
        Alternate Number: 0
        Class: ff(vend.) 
        Sub Class: 00
        Protocol: 00
        Number of Endpoints: 4

            Endpoint Address: 81
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 02
            Direction: out
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 82
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

            Endpoint Address: 83
            Direction: in
            Attribute: 2
            Type: Bulk
            Max Packet Size: 1024
            Interval: 0ms

我不知道,ximea和opencv怎么走在一起。

我只使用 ximea api 并且它有效。

您的问题"xiAPI: Failed to change thread scheduler, check user limit for realtime priority."表示:您的进程没有设置调度的权限policy/priority。您可以通过 运行 root 进程更改此设置。或者你可以在文件的属性中设置它(你需要root权限才能这样做),e。 G。 Why does `sched_setscheduler()` require root priveledges?

setcap cap_sys_nice+ep ./your_program

我认为您的其他问题 "ERROR: pixel -7x323 has no correction pixel!" 与存储在相机中的 BPL 文件有关。它定义了应该纠正的损坏像素(坏像素校正)。在 ximea api 中,您可以关闭此更正,请参阅 ximea: Sensor Defects Correction parameters