transform

Hough Transform: improving algorithm efficiency over OpenCL

与世无争的帅哥 提交于 2019-12-13 05:33:52
问题 I am trying to detect a circle in binary image using hough transform. When I use Opencv's built-in function for the circular hough transform, it is OK and I can find the circle. Now I try to write my own 'kernel' code for doing hough transform but is very very slow: kernel void hough_circle(read_only image2d_t imageIn, global int* in,const int w_hough,__global int * circle) { sampler_t sampler=CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST; int gid0 = get_global

css :hover rotate element and keep the new position

对着背影说爱祢 提交于 2019-12-13 04:24:36
问题 I there a (css?) possibility to rotate an element on element:hover and keep the new position when moving the mouse out? It seems that the element rotates back to it`s default position when the cursor leaves the :hover - area. edit: now it seems to work (forgot to say, that i wanted it to happen each time/ multiple times): var rotate = 360; $('.artistbutton360').bind({ mouseenter: function() { $(this).css("-webkit-transform","rotate("+ rotate +"deg)"); $(this).css("-moz-transform","rotate("+

turning data into a list

牧云@^-^@ 提交于 2019-12-13 03:59:55
问题 I have combined two .txt files using a program i wrote. Now once i combined these two .txt files i was left with an unsorted combination of data. my data looks like this Bud Abbott 51 92.3 Mary Boyd 52 91.4 Hillary Clinton 50 82.1 Don Adams 51 90.4 Jill Carney 53 76.3 Randy Newman 50 41.2 however i want it to look like this ['Bud', 'Abbott', 51, 92.3] ['Don', 'Adams', 51, 90.4] ['Mary', 'Boyd', 52, 91.4] ['Jill', 'Carney', 53, 76.3] ['Hillary', 'Clinton', 50, 82.1] ['Randy', 'Newman', 50, 41

Extract TU Partitioning Information in HEVC Reference Software 16.18

北城余情 提交于 2019-12-13 03:57:01
问题 I want to extract CU/PU/TU partitioning data from HEVC HM encoder. I could extract CU/PU partitioning information using getHeight/getWidth/getPartitionSize functions in TComDataCU class. But, don't know how to access TU partitioning information. Please help. 回答1: You can do it easily on the decoder side. You need to find the function parseCoeffNxN and then access the TU size with uiWidth and uiHeight . Start with this simple test and then give feedbacks here. If there's a problem, we will

OpenCV C++ Keypoints and descriptors transform with homography of warped images

 ̄綄美尐妖づ 提交于 2019-12-13 03:34:02
问题 I have created a stitching program that can stitch any number of images together into a single mosaic. The efficiency of the program needs work which I am trying to improve. My goal is to create a list of the already found keypoints and descriptors so the program doesn't need to re do work it has already done and this way memory isn't overloaded if there are too many images. To do this I need to have the keypoints and descriptors transformed along side the actual images themselves. Here is

Changing Rotation of Mat Expansion Indicator

被刻印的时光 ゝ 提交于 2019-12-13 03:09:23
问题 I was successfully able to move the mat Indicator to the left, instead of the right and I used the transform attribute to make it turn inward when expanding. However I want the indicator to face upward when expanded and downward when collapsed. How do I properly style it to achieve this: https://stackblitz.com/edit/indicatorrotation?file=styles.css expansion-overview-example.css .mat-expansion-panel-header { flex-direction: row-reverse; } Global styles.css .mat-expansion-indicator::after {

Vertically centred div which increases parent height

喜你入骨 提交于 2019-12-13 02:17:38
问题 There is a div which has a dynamic content. The height of the parent is 100% of the body and child is unknown. translateY(-50%) technique works good only if a child content height is less than parent. But if it's more child div(green) starts to overflow the parent (yellow) as on below image. What's a proper way to set parent div increase the height and add some paddings. .body { height: 300px; background: red; } .parent { height: 100%; position: relative; background: rgb(105, 199, 115); }

IEEE 754 to decimal in C language

房东的猫 提交于 2019-12-13 02:14:00
问题 I'm looking the best way to transform a float number to its decimal representation in C. I'll try to give you an example: the user introduces a number in IEEE754 (1 1111111 10101...) and the program has to return the decimal representation (ex. 25.6) I've tried with masks, and bitwise operations, but I haven't got any logical result. 回答1: I believe the following is performing the operation you describe: I use the int as an intermediate representation because it has the same number of bits as

How to convert dateTime while transforming XML via XSLT

試著忘記壹切 提交于 2019-12-13 00:26:02
问题 How should I convert dateTime in XSLT if I get the dateTime in GMT in below format XML input: <items> <item> <lastname>Lisa</lastname> <firstname>Rimpell</firstname> <checkintime>2017-02-05T05:40:00+03:00</checkintime> <chekouttime>2017-02-05T10:40:00+03:00</chekouttime> <address></address> </item> </items> XSLT is: <xsl:template match="/"> <Response> <Data> <xsl:call-template name="Buildusers" /> </Data> </Response> </xsl:template> <xsl:template name="Buildusers"> <Rows> <xsl:for-each select

string转化大小写(C++)

主宰稳场 提交于 2019-12-12 17:14:53
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 如何将一个字符串转换成大写或者小写?这是字符串匹配中经常需要做的事情,然而C++的Standard Library并没有提供将std::string转成大写和小写的功能,只有在 提供将char转成大写(toupper)和小写(tolower)的功能而已。 但我们可以利用STL的transform配合toupper/tolower,完成std::string转换大(小)写的功能,也看到 模版编程 的威力了,一个transform函数,可以适用于任何类型,且只要自己提供 函数 ,就可完成任何Transform的动作。 C++ #include <iostream> #include <string> #include <cctype> #include <algorithm> using namespace std; int main() { string s = "Clare"; // toUpper transform(s.begin(), s.end(), s.begin(), ::toupper); // toLower //transform(s.begin(),s.end(),s.begin(), ::tolower); cout << s << endl; } C #include <stdio.h>