Wireshark with Libpcap (or WinPcap) portable (without Admin rights - wireshark

The portable version of wireshark from:
https://www.wireshark.org/download.html
works fine on my windows 10, but doesn't include portable capturing triber Libpcap or WinPcap.
On the Npcap page
https://nmap.org/npcap/
it is written:
"Libpcap API: Npcap uses the excellent Libpcap library, enabling Windows applications to use a portable packet capturing API and so indeed on the Libpcap library page
https://www.tcpdump.org/
there is the portable C/C++ Libpcap library available.
How can I use the C/C++ Libpcap library within Wireshark or with Java (pcap4j)?
I downloaded it and it consists mainly of *.h files.
Thanks for any advices.

How can I use the C/C++ Libpcap library within Wireshark
If you're on a UN*X, libpcap is usually shipped as part of the operating system, so it should Just Work.
If you're on Windows, you need a version of libpcap that's made to work on Windows. That's what Npcap is.
If you want to capture traffic on Windows, you will have to install Npcap; you can't just run a Wireshark from a flash drive or other medium containing a portable version of Wireshark without installing anything, you will have to install Npcap on your computer.
I downloaded it and it consists mainly of *.h files.
You downloaded the source code, which isn't directly usable. It has to be compiled - and installed.

Related

Can I use OpenCV on AIX?

I developed an image processing library with OpenCV and it works well in Windows, Android(Native) and iOS.
Now I want to build my library to run on AIX server. Unfortunately I couldn't find any guidance for building OpenCV for AIX.
Can you give me any guidance?
There is no official support for OpenCV on AIX. No community driven project either.
However there is another project maintained by IBM called IBM AIX Toolbox for Linux Applications.
This project is intended for developers and provides most Linux based, especially GNU based programming languages, tools & libraries to be run on AIX.
You'll have to go through setting up the environment / dependencies, though it must compile just fine. Linux tutorials for building OpenCV using GCC should work just fine.
You might ask the person at Perzl if he could build it. He must have a lot of knowledge, tools, and environment already. I also find it much better than the IBM AIX Toolbox so if you want to try to do it yourself, I would start with his versions instead of IBM's.
Group Bull use to have a similar set of built open source packages but I don't know where they disappeared to.

Is it possible to use TensorFlow C++ API on Windows?

I'm interested in incorporating TensorFlow into a C++ server application built in Visual Studio on Windows 10 and I need to know if that's possible.
Google recently announced Windows support for TensorFlow: https://developers.googleblog.com/2016/11/tensorflow-0-12-adds-support-for-windows.html
but from what I can tell this is just a pip install for the more commonly used Python package, and to use the C++ API you need to build the repo from source yourself: How to build and use Google TensorFlow C++ api
I tried building the project myself using bazel, but ran into issues trying to configure the build.
Is there a way to get TensorFlow C++ to work in native Windows (not using Docker or the new Windows 10 Linux subsystem, as I've seen others post about)?
Thanks,
Ian
It is certainly possible to use TensorFlow's C++ API on Windows, but it is not currently very easy. Right now, the easiest way to build against the C++ API on Windows would be to build with CMake, and adapt the CMake rules for the tf_tutorials_example_trainer project (see the source code here). Building with CMake will give you a Visual Studio project in which you can implement your C++ TensorFlow program.
Note that the tf_tutorials_example_trainer project builds a Console Application that statically links all of the TensorFlow runtime into your program. At present we have not written the necessary rules to create a reusable TensorFlow DLL, although this would be technially possible: for example, the Python extension is a DLL that includes the runtime, but does not export the necessary symbols to use TensorFlow's C or C++ APIs directly.
There is a detailed guide by Joe Antognini and a similar TensorFlow ReadMe at GitHub explaining the building of TensorFlow source via CMake. You also need to have SWIG installed on your machine which allows connecting C/C++ source with the Python scripting language. I did use Visual CMAKE (cmake-gui) with the screen capture shown below.
In the CMake configuration, I used Visual Studio 15 2017 compiler. Once this stage successfully completes, you can click on the Generate button to go ahead with the actual build process.
However, on Visual Studio 2015, when I attempted building via the "ALL_BUILD" project, the setup gave me "build tools for v141 cannot be found" error. This did not go away even when I attempted to retarget my solution. Finally, the solution got built successfully with Visual Studio 2017. You also need to manually set the SWIG_EXECUTABLE path in CMake before it successfully configures.
As indicated in the Antognini link, for me the build took about half an hour on a 16GB RAM, Core i7 machine. Once done, you might want to validate your build by attempting to run the tf_tutorials_example_trainer.exe file.
Hope this helps!
For our latest work on building TensorFlow C++ API on Windows, please look at this github page. This works on Windows 10, currently without CUDA support (only CPU).
PS:
Only the bazel build method works, because CMake is not supported and not maintained anymore, resulting in CMake configuration errors.
I had to use a downgraded version of my Visual Studio 2017 (from 15.7.5 to 15.4) by adding "VC++ 2017 version 15.4 v14.11 toolset" through the installer (Individual Components tab).
The cmake command which worked for me was:
cmake .. -A x64 -DCMAKE_BUILD_TYPE=Release ^
-T "v141,version=14.11" ^
-DSWIG_EXECUTABLE="C:/Program Files/swigwin-3.0.12/swig.exe" ^
-DPYTHON_EXECUTABLE="C:/Program Files/Python/python.exe" ^
-DPYTHON_LIBRARIES="C:/Program Files/Python/libs/python27.lib" ^
-Dtensorflow_ENABLE_GPU=ON ^
-DCUDNN_HOME="C:/Program Files/cudnn-9.2-windows10-x64-v7.1/cuda" ^
-DCUDA_TOOLKIT_ROOT_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.0"
After the build, open tensorflow.sln in Visual Studio and build ALL_BUILD.
If you want to enable GPU computation, do check your Graphics Card here (Compute Capability > 3.5). Do remember to install all the packages (Cuda Toolkit 9.0, cuDNN, Python 3.7, SWIG, Git, CMake...) and add the paths to the environment variable in the beginning.
I made a README detailing how to I built the Tensorflow dll and .lib file for the C++ API on Windows with GPU support building from source with Bazel. Tensorflow version 1.14
The tutorial is step by step and starts at the very beginning, so you may have to scroll down past steps you have already done, like checking your hardware, installing Bazel etc.
Here is the url: https://github.com/sitting-duck/stuff/tree/master/ai/tensorflow/build_tensorflow_1.14_source_for_Windows
Probably you will want to scroll all the way down to this part:
https://github.com/sitting-duck/stuff/tree/master/ai/tensorflow/build_tensorflow_1.14_source_for_Windows#step-7-build-the-dll
It shows how to pass command to create .lib and .dll.
Then to test your .lib you should link it into your c++ project,
Then it will show you how to identify and fix the missing symbols using the TF_EXPORT macro
I am actively working on making this tutorial better so feel free to leave comments on this answer if you are having problems.

The exact build configuration of pre-built OpenCV 3.1 on Windows

I recently use the pre-built OpenCV 3.1.0 on Windows which was downloaded from here. Actually, I followed the official installation.
The thing is that I find that the VideoCapture module of pre-built OpenCV processes video very slowly. It seems that it has no support of ffmpeg. And I find the official note:
To use the OpenCV library you have two options: Installation by Using the Pre-built Libraries or Installation by Making Your Own Libraries from the Source Files . While the first one is easier to complete, it only works if you are coding with the latest Microsoft Visual Studio IDE and doesn't take advantage of the most advanced technologies we integrate into our library.
It makes me curious about what is the actual build configuration of pre-built OpenCV 3.1.0 (or other versions) on Windows. No supports of TBB, IPP, Eigen, CUDA, etc...? I didn't find any clue on the internet. Anyone knows?

Develop for stm32 on beaglebone

is it possible to compile stm32 code on beaglebone (possibly black)?
As it seems platform has to have access to arm-none-eabi-gcc to be able to compile for stm32?
Basically, yes you can.
In order to compile code for stm32 family of mcus you would need a cross-compiler. if you run linux on your beaglebone board you can simply download premade toolchain for your distribution. if you dont find any, you would just build a compiler from source by specifying host and target.
https://wiki.osdev.org/GCC_Cross-Compiler#Preparing_for_the_build this article will help you build a gcc cross compiler for every supported target and host. it takes less then 15 mins.
Few things to note here, once you build your cross compiler, you wont have any kind of libc shiped with it. so get one on github (there are few). your options would be libc or libc-nano (which talks for it self). And from there you will be able to compile code for your stm32 mcu.
For example i ran ubuntu server on my beaglebone black, so in order to compile for stm32 on that, i installed armv7-A gcc compiler, so i can compile for beaglebone it self. then i downloaded source at https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads compile the source and you will have an official arm toolchain for microcontrollers.

EmguCV - nvcuda.dll could not be found

I've been asked to build a real-time face recognition application, and after some looking around I've decided to try EmguCV and OpenCV as the facial recognition library.
The issue I'm having at the moment is trying to get the SDK installed and working. I've followed the instructions found here to try and get it running, but I still can't run the samples. Whenever I try and run them, I get the error
The program can't start because nvcuda.dll is missing from your computer.
Try reinstalling the program to fix this problem.
I've tried most of the usual fixes, such as adding the bin folder to my environment path and copying the dll's into my system32 folder, but none of it seems to work.
EmguCV version 2.4.2.1777-windows-x64-gpu
Windows 8
AMD Radeon HD 6700 series graphics card.
I'm assuming this is an issue with the fact that I dont have an nVidia graphics card, but I'm not sure what I can do about it. For now, I'm going to try recompiling the source rather than using the downloaded .exe, and seeing if that helps.
Any suggestions?
Had the same problem, EmguCV 2.4.2 (no matter if x86 or x64) is compiled with GPU and you have to had nvidia GPU with CUDA support. So, if you want for eg. Fisherfaces from 2.4 in C# - wait for non-GPU release or buy/borrow CUDA card ;)
I happen to have the exact same problem as you. Everything is working fine on my computer (WinXP 32-bit) but not on Win7 64-bit computers.
This was because on my computer I already have OpenCV 2.4.2 installed and when I execute my program the path to the OpenCV dll points to the OpenCV folder and not to the dlls in the EmguCV folder. The original OpenCV dll don't have this dependency on NVidia's driver.
I used Dependency Walker to help me find out what was happening, as suggested here.
This link says that only the -gpu packages have gpu processing enabled but as you say the latest version (2.4.2) only a gpu package and no no-gpu package...
I read here that all I needed was to download the latest NVidia drivers to get the nvcuda.dll file but I downloaded many packages and never found this file: gpu computing sdk, cuda toolkit, display drivers, device drivers...
My workaround, instead of using an older version of EmguCV/OpenCV is to use the original dll from OpenCV 2.4.2.
I just used nvcuda.dll from dll-files.com.
It seems the issue is that the latest version on the site does not contain a non-GPU enhanced download, and that the GPU enhanced download requires an nVidia graphics card for CUDA integration.
I successfully downloaded and run the previous version which does not have GPU enhancements.
I had similar problem.
When I compile and run my application on computer with NVIDIA gpu it works fine.
Problem was when I moved app to another computer.
This second computer has no NVIDIA gpu and it threw 'Emgu.CV.CvInvoke' exception.
After many attempts I fortunately solved this problem.
As you mentioned before for now there is only gpu package for version 2.4.2.
I didn't notice this before.
For me solution was:
Copy files: 'cudart64_42_9.dll' and 'npp_42_9.dll' into Debug (application) folder
Copy file 'nvcuda.dll' into System32 folder.
After this steps aplication works on all computers even without NVIDIA gpu/ CUDA.
Other solution might be using opencv universal gpu version (for now is alpha 2.4.9) link: http://sourceforge.net/projects/emgucv/files/emgucv/2.4.9-alpha/
You can download source EmguCV from GIT and compile it, i have done this and works :
http://www.emgu.com/wiki/index.php/Download_And_Installation#Building_from_Git
It generates a non-GPU version of dlls
Regards.
here's also another copy of the dll's:
http://www.kimchiandchips.com/files/vvvv/nvcuda/
so 2 solutions:
Get NVidia CUDA DLL's from the above link. Ideally rename the 64 or 32bit version to nvcuda.dll based on your required platform. Put next to your opencv dll's
Upgrade to 2.4.9 which has universal GPU support
I also had some problems when doing my dissertation using EmguCV for face recognition.
Try to use the stablest version libemgucv-windows-x86-2.4.0.1717.exe
Try not to use the gpu download, this version has the least bugs and the 32-bit is better than the x64.
when compiling for the first time use visual studio 2012.
With this version you wont need to install all the above mentioned. You can see this example to know it really works : http://sourceforge.net/projects/emgufacerecog/

Resources