# ERROR: agoVerifyGraph: kernel org.khronos.openvx.magnitude: invalid format for argument#2

**URL:** <https://community.khronos.org/t/error-agoverifygraph-kernel-org-khronos-openvx-magnitude-invalid-format-for-argument-2/106724>\
**Category:** OpenVX\
**Created:** [January 1, 2021, 2:39am UTC](https://community.khronos.org/t/error-agoverifygraph-kernel-org-khronos-openvx-magnitude-invalid-format-for-argument-2/106724 "2021-01-01T02:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SijinJohn](https://community.khronos.org/letter_avatar_proxy/v4/letter/s/7cd45c/32.png) [@SijinJohn](https://community.khronos.org/u/SijinJohn)\
**Post date:** [January 1, 2021, 2:39am UTC](https://community.khronos.org/t/error-agoverifygraph-kernel-org-khronos-openvx-magnitude-invalid-format-for-argument-2/106724/1 "2021-01-01T02:39:47Z")

</div>

```auto
int main( int argc, char * argv[] )
{

 const char * video_sequence = argv[1];
 CGuiModule gui( video_sequence );

 if( !gui.Grab() )
    {
        printf( "ERROR: input has no video\n" );
        return 1;
    }
 vx_uint32 width = gui.GetWidth(); // image width
 vx_uint32 height = gui.GetHeight(); // image height

 vx_context context = vxCreateContext();
 vx_graph graph = vxCreateGraph(context);
 ERROR_CHECK_OBJECT( context );
 ERROR_CHECK_OBJECT( graph );

 vxRegisterLogCallback( context, log_callback, vx_false_e );
 vxAddLogEntry( ( vx_reference ) context, VX_FAILURE, "Hello there!\n" );

 vx_image images[] = {
   vxCreateImage(context, width, height,VX_DF_IMAGE_UYVY),
   vxCreateImage(context, width, height,VX_DF_IMAGE_U8),
   vxCreateImage(context, width, height,VX_DF_IMAGE_U8),
 };
 for( vx_size i = 0; i < sizeof( images ) / sizeof( images[0] ); i++ )
 {
     ERROR_CHECK_OBJECT( images[i] );

 }

//The code to create virtual images that connect nodes
vx_image virts[] = {
  vxCreateVirtualImage(graph, width, height,VX_DF_IMAGE_VIRT),
  vxCreateVirtualImage(graph, width, height,VX_DF_IMAGE_VIRT),
  vxCreateVirtualImage(graph, width, height,VX_DF_IMAGE_VIRT),
  vxCreateVirtualImage(graph, width, height,VX_DF_IMAGE_VIRT)
};

for( vx_size i = 0; i < sizeof( virts ) / sizeof( virts[0] ); i++ )
{

    ERROR_CHECK_OBJECT( virts[i] );

}

 vx_node channelExtract_node = vxChannelExtractNode(graph, images[0],VX_CHANNEL_Y, virts[0]);
 vx_node Gaussian3x3_node = vxGaussian3x3Node(graph, virts[0], virts[1]) ;
 vx_node Sobel3x3_node = vxSobel3x3Node (graph, virts[1], virts[2], virts[3]);
 vx_node Magnitude_node = vxMagnitudeNode(graph, virts[2], virts[3], images[1]);
 vx_node Phase_node = vxPhaseNode (graph, virts[2], virts[3], images[2]);

 ERROR_CHECK_OBJECT( channelExtract_node );
 ERROR_CHECK_OBJECT( Gaussian3x3_node );
 ERROR_CHECK_OBJECT( Sobel3x3_node );
 ERROR_CHECK_OBJECT( Magnitude_node );
 ERROR_CHECK_OBJECT( Phase_node );

 ERROR_CHECK_STATUS( vxReleaseNode( &channelExtract_node ) );
 ERROR_CHECK_STATUS( vxReleaseNode( &Gaussian3x3_node ) );
 ERROR_CHECK_STATUS( vxReleaseNode( &Sobel3x3_node ) );
 ERROR_CHECK_STATUS( vxReleaseNode( &Magnitude_node ) );
 ERROR_CHECK_STATUS( vxReleaseNode( &Phase_node ) );

//Verify the graph
 ERROR_CHECK_STATUS( vxVerifyGraph (graph));

```

it am trying a sample code, but i get this error…

```auto
**ERROR**
 **OK: FILE ../../tutorial_videos/PETS09-S1-L1-View001.avi 768x480**
**LOG: [status = -1] Hello there!**

**LOG: [status = -14] ERROR: agoVerifyGraph: kernel org.khronos.openvx.magnitude: invalid format for argument#2**

**ERROR: failed with status = (-14) at /home/openvx/openvx_tutorial/tutorial_exercises/Acsia/Acsia.cpp#97**

```

---

<div class="post-metadata">

**Author:** ![system](https://community.khronos.org/uploads/default/original/2X/b/ba89cb49313a0e869198c8be354afde8bcae027e.png) [@system](https://community.khronos.org/u/system)\
**Post date:** [July 3, 2021, 2:39am UTC](https://community.khronos.org/t/error-agoverifygraph-kernel-org-khronos-openvx-magnitude-invalid-format-for-argument-2/106724/2 "2021-07-03T02:39:50Z")

</div>

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.
