Posts by karlphillip • 1,264 points
17 posts
-
4
votes3
answers116
viewsA: Why is it not possible to assign a string vector after being declared a character?
Attributing in this way is not possible simply because in C and C++ the array name is a pointer to the beginning of the array in memory. To clarify this question, the instructions below perform…
-
1
votes1
answer77
viewsA: Extract data with bitshift and bitwise operators
There are several problems in your code. The main one is the order of use of operators of bitwise and operators of bitshift that are reversed. The only way to ensure that you understand how to…
-
5
votes2
answers421
viewsA: How to write a recursive function?
Instead of offering the ready-made source code, which helps nothing if you need to write new recursive functions in the future, I’ll give you tips on how to implement a recursive function. Any…
-
4
votes2
answers109
viewsA: Abstract type of variable
You could have reported that you’re messing with the engine of Unreal. Something else, USphereComponent is not abstract. Technically speaking, she’s considered concrete because you can instantiate…
c++answered karlphillip 1,264 -
7
votes3
answers9428
viewsA: How does serial communication work and how do I use C/C++?
The explanation with the level of detail you are seeking would take hours to formulate. Maybe it’s best to investigate the material that other people are recommending. A quick C++ solution would be…
-
0
votes2
answers297
viewsA: Connect D-link DCS-932L Camera with opencv
The connection string was wrong, but anyway you’re forgetting to replace in the string: String end =…
-
3
votes4
answers1489
viewsA: Cleaning the Buffer after getchar
getchar() not a good option to read user input. The reason behind this is that the function will return only the first character of the input buffer (or keyboard buffer). Let’s look at an example:…
-
4
votes2
answers394
viewsA: Function giving wrong values
It is good to keep in mind that the signature of sqrt() informs that he returns a double. When trying to save your result to a variable float you may end up losing information, which would justify…
canswered karlphillip 1,264 -
1
votes1
answer2130
viewsA: XY position in C, repositioning
Are you referring to the functions of header conio.h (created for command line apps on Windows). This header is not part of the standard C language library, and few compilers support it natively.…
-
5
votes1
answer390
viewsA: Calculate percentage of a face in an image
Facial detection algorithms work from Features () facial characteristics. Thus, certain Features must be present in the photo so that the algorithm can extract the necessary data and determine…
-
1
votes2
answers1776
viewsA: Accessviolationexception - Read or write attempt in protected memory
There is more than one problem in your code and I will point out some of them to you. Although the error happens on that line, the problem is probably in the instructions that are executed before…
-
2
votes1
answer242
viewsA: How to plot a graph when terminating a computer vision script on Raspberry pi?
// Se o usuário pressionar a tecla ESC if cv.WaitKey(10) == 27: // Exibir o relatório Relatorio_Movimentos(Parado, Aj_Sup, Aj_Inf, Dir, Esq, Frt, Trs) // Observe que se a…
-
8
votes1
answer5452
viewsA: Basic image editing using Opencv
What you are looking for can be achieved by defining a ROI (Region of Interest - Region of Interest) in the original image. An ROI specifies an area of interest within an image and makes it possible…
-
9
votes2
answers990
viewsA: How to verify collision between particles?
You can investigate the following Qt classes to accomplish this task for you: QGraphicsScene QGraphicsItem The two classes together offer features for collision detection, as shown in the example of…
-
22
votes3
answers1531
viewsA: How to identify heat regions in thermal images?
Although I have decided to answer this question, I believe that in questions of computer vision and image processing, the person asking should show how she has tried to solve the problem:…
-
7
votes4
answers11111
viewsA: Converting float to char array in C/C++
Although the other answers solve the problem, I put this question to the test precisely to force engineering academics to think about a mathematical solution. This is simpler, more natural and more…
-
21
votes4
answers6387
viewsA: How to convert an int to two bytes in C/C++?
One thing we have to clear up first is that the guy int on the modern platforms has 4 bytes. That’s a problem because it is impossible to make 4 bytes fit within 2 bytes, it’s not true?! On the…