Touch event in certain color rect

本文介绍了一个UIImage的分类,允许开发者查询图片中任意像素的颜色值。通过创建一个1x1像素的位图上下文来绘制并获取指定像素的颜色。此外,还提供了一个自定义按钮类,用于检查触摸事件是否落在具有透明背景的按钮上。

UIImage+ColorAtPixelcategory

#import <UIKit/UIKit.h>

/*

A category on UIImage that enables you to query the color value of arbitrary

pixels of the image.

*/

@interface UIImage (ColorAtPixel)

- (UIColor *)colorAtPixel:(CGPoint)point;

@end

#import <CoreGraphics/CoreGraphics.h>

#import "UIImage+ColorAtPixel.h"

@implementation UIImage (ColorAtPixel)

/*

Returns the color of the image pixel at point. Returns nil if point lies outside the image bounds.

If the point coordinates contain decimal parts, they will be truncated.

To get at the pixel data, this method must draw the image into a bitmap context.

For minimal memory usage and optimum performance, only the specific requested

pixel is drawn.

If you need to query pixel colors for the same image repeatedly (e.g., in a loop),

this approach is probably less efficient than drawing the entire image into memory

once and caching it.

*/

- (UIColor *)colorAtPixel:(CGPoint)point {

// Cancel if point is outside image coordinates

if (!CGRectContainsPoint(CGRectMake(0.0f, 0.0f, self.size.width, self.size.height), point)) {

return nil;

}

// Create a 1x1 pixel byte array and bitmap context to draw the pixel into.

// Reference: http://stackoverflow.com/questions/1042830/retrieving-a-pixel-alpha-value-for-a-uiimage

NSInteger pointX = trunc(point.x);

NSInteger pointY = trunc(point.y);

CGImageRef cgImage = self.CGImage;

NSUInteger width = CGImageGetWidth(cgImage);

NSUInteger height = CGImageGetHeight(cgImage);

CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();

int bytesPerPixel = 4;

int bytesPerRow = bytesPerPixel * 1;

NSUInteger bitsPerComponent = 8;

unsigned char pixelData[4] = { 0, 0, 0, 0 };

CGContextRef context = CGBitmapContextCreate(pixelData,

1,

1,

bitsPerComponent,

bytesPerRow,

colorSpace,

kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);

CGColorSpaceRelease(colorSpace);

CGContextSetBlendMode(context, kCGBlendModeCopy);

// Draw the pixel we are interested in onto the bitmap context

CGContextTranslateCTM(context, -pointX, -pointY);

CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), cgImage);

CGContextRelease(context);

// Convert color values [0..255] to floats [0.0..1.0]

CGFloat red = (CGFloat)pixelData[0] / 255.0f;

CGFloat green = (CGFloat)pixelData[1] / 255.0f;

CGFloat blue = (CGFloat)pixelData[2] / 255.0f;

CGFloat alpha = (CGFloat)pixelData[3] / 255.0f;

return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];

}

@end

Custom button

#define kAlphaVisibleThreshold (0.1f);

@interface OBShapedButton : UIButton {

// Our class interface is empty. OBShapedButton only overwrites one method of UIView.

// It has no attributes of its own.

}

@end

#import "OBShapedButton.h"

#import "UIImage+ColorAtPixel.h"

@implementation OBShapedButton

// UIView uses this method in hitTest:withEvent: to determine which subview should receive a touch event.

// If pointInside:withEvent: returns YES, then the subview’s hierarchy is traversed; otherwise, its branch

// of the view hierarchy is ignored.

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {

// Return NO if even super returns NO (i.e., if point lies outside our bounds)

BOOL superResult = [super pointInside:point withEvent:event];

if (!superResult) {

return superResult;

}

// We can't test the image's alpha channel if the button has no image. Fall back to super.

UIImage *buttonImage = [self backgroundImageForState:UIControlStateNormal];

if (buttonImage == nil) {

return YES;

}

CGColorRef pixelColor = [[buttonImage1 colorAtPixel:point] CGColor];//[[buttonImage1 colorAtPixel:point] CGColor];

CGFloat alpha = CGColorGetAlpha(pixelColor);

return alpha >= kAlphaVisibleThreshold;

}

@end

08-06 16:39:31.561812 8744 19008 D ShortVideoApp-111-10373: commonScoreStrategy scenarios 1 08-06 16:39:31.561854 8744 19008 D ShortVideoApp-111-10373: notifyScoreChange appScene COMMON score 100 08-06 16:39:31.562120 8744 19008 D ScorePolicy: handleScoreChanged: [] 08-06 16:39:31.562150 8744 19008 D ScorePolicy: handleScoreChanged: [] 08-06 16:39:31.562408 8744 19008 D ScorePolicy: handleScoreChanged: [] 08-06 16:39:31.566832 2086 2604 W AudioBoost: receive message kWhatRemoveActiveAudioTrack pid: 6748 08-06 16:39:31.566927 2086 2604 W AudioBoost: handle message kWhatRemoveActiveAudioTrack pid: 6748 has not been boosted 08-06 16:39:31.569363 3377 3544 I UserAwareMgr[QoSPolicy]: setSceneQoS begin:false sceneId:5 08-06 16:39:31.579884 11003 12017 I DeepThinker: BaseScene: RecordingScene : exitScene = {6748,10373,com.kuaishou.nebula} 08-06 16:39:31.580173 11003 12017 I DeepThinker: AppSceneEventManager: notifyEventResult eventType=221, pkgName=com.kuaishou.nebula, pid=6748, eventTypeState=1 08-06 16:39:31.580251 11003 12017 I DeepThinker: EventHubService#EventHubBinderServer: broadcastEvent onEventStateChanged, fingerprint = 3199354511003 08-06 16:39:31.594459 3377 8157 I CwbClient: R/G/B:0-0-0 08-06 16:39:31.597384 1847 2095 I SDM : DisplayBase::CommitThread: Received idle timeout, panel: cmd, timeout: 70000 us 08-06 16:39:31.620098 8618 28970 D SmartDataSwitchEventRegistrar: limitReached ignored when wifi connected 08-06 16:39:31.698050 3377 8157 I CwbClient: R/G/B:0-0-0 08-06 16:39:31.720942 3377 5383 D FusionLightNextGen: raw_lux -1.0, raw_cct -1.0, r/g/b/c: 8203.2/6459.6/3881.1/17430.5, R/G/B: 0.0/0.0/0.0, bri 1179.0, lux: 243.823334, cct: -1.0, ir: 0.031939, conf: 0, cnt: 0 08-06 16:39:31.779838 9406 9906 W Battery : ThermalControllHandler: MSG_THERMAL_CONTROL_STATUS_CHANGED,msg:10 08-06 16:39:31.780254 9406 9906 D Battery : ThermalControllerCenter: AmbientTemperature meet certain conditions. 08-06 16:39:31.780403 9406 9906 W Battery : ThermalControllerCenter: mSafetyState=00000, mSafetyTestConfigList=01111,10111,11011,11101,11110,00111,01011,01101,01110,10011,10101,10110,11001,11010,11100,11111 08-06 16:39:31.780546 9406 9906 W Battery : ThermalControllHandler: tempLevel=[7],userMode=2,gameUserMode=7,appType=16,envTempType=0,appStates=[],appSwitchSafetyMode=false,split=[],float=[],full=[com.kuaishou.nebula], tempGear=[7],configItemName=category_16 08-06 16:39:31.780735 9406 9906 D Battery : Thermal.TsensorConfig: tsensorSource of cpu is null 08-06 16:39:31.780815 9406 9906 D Battery : ThermalControllHandler: Same as last policy, cur: com.kuaishou.nebula 08-06 16:39:31.782224 3377 8663 D SystemPressureManager: taskInfos: {} 08-06 16:39:31.782413 3377 8663 I OplusCpuLimitManager: OplusCpuHighLoad: newLoadLevel=1, newMngLevel=1, (nl_load=1, nl_thermal=1, nl_scene=1), curMngLevel=1, CL=0, curWinCL=0, curShortWinCL= 0, latestCL=0, latestThermalLevel=7, expHlScene=false 08-06 16:39:31.784142 3120 3120 I synaLib : tcm: STATUS: Exit DOZE mode 08-06 16:39:31.784535 3120 3120 E OplusTouchDaemon: [prevent][curved_large_handle_V2][3008]: id:0 pos:1 center_down:1 (10277 8411)(0 0 0 0) 08-06 16:39:31.784601 3120 3120 E OplusTouchDaemon: [touchEvent][ts_report_touch_data][643]: first touch point id 0 [10277 8411 0 0 0 0 0] 08-06 16:39:31.784978 3377 5470 V UnwantedInteractionBlocker: notifyMotion - id=c623fee eventTime=70005951185000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x0, action=DOWN, actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, xCursorPosition=nan, yCursorPosition=nan, downTime=70005951185000 08-06 16:39:31.785028 3377 5470 V UnwantedInteractionBlocker: Pointer 0: id=0, toolType=FINGER, x=1027.618652, y=841.069763, pressure=1.000000, size=0.025490, touchMajor=0.499971, touchMinor=0.799954, toolMajor=0.499971, toolMinor=0.799954, orientation=0.000000 08-06 16:39:31.785759 3377 5468 V InputDispatcher: dispatchMotion - eventTime=70005951185000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x62000000, action=DOWN, actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0,edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, downTime=70005951185000 08-06 16:39:31.786043 3377 5468 V system_server: addOrUpdateWindow out windows: set 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity firstDownTimeInTarget to 70005951185000 flags=FOREGROUND | SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.786080 3377 5468 V system_server: addOrUpdateWindow out windows: set [Gesture Monitor] OplusExInputReceiver1 firstDownTimeInTarget to 70005951185000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.786103 3377 5468 V system_server: addOrUpdateWindow out windows: set [Gesture Monitor] OplusUAHInputChannel firstDownTimeInTarget to 70005951185000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.786241 3377 5468 V InputDispatcher: app touch from noFoucs to foucs 08-06 16:39:31.786449 3377 5468 I InputDispatcher: Publishing 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity seq=1768214, Pointers = 0: (1027.6, 841.1) action=DOWN downTime=70005951185000 eventTime= 70005951185000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 08-06 16:39:31.787037 6748 6748 W InputLog: VRI[EditorActivity] : debugInputEventStart event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=70005951, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=207765486 } 08-06 16:39:31.787438 3377 8118 D OMP_Detector: D:done mCurrStatus: 0 08-06 16:39:31.787468 3377 8380 I [UAH_CLIENT]: UahEventAcquire, cmdid:37, pkg:none, identity:OplusUAwareInputHelper 08-06 16:39:31.787809 6748 6748 I DynamicFramerate [AnimationSpeedAware]: onEventHandled: info: InputEventInfo: mX = 0, mY = 0, mAction = 0, xVelocity = 0.0, yVelocity = 0.0, mIsMultiPointer = false, mVsyncTime = 70005956, mIsMoving = true, mUpdated = true 08-06 16:39:31.787898 6748 6748 D VRI[EditorActivity]: handleWindowFocusChanged mWindowFocusChanged false mUpcomingWindowFocus true mAdded true 08-06 16:39:31.787925 3377 3574 D PowerManagerService: userActivityNoUpdateLocked: groupId=0, eventTime=70005951, event=touch, flags=0x0, uid=1000 08-06 16:39:31.787971 6748 6748 V AutofillManager: requestHideFillUi(null): anchor = null 08-06 16:39:31.788200 6748 6748 E Input_Track: [Input] Start <<<<<<<<<<<<<< 207765486 08-06 16:39:31.788243 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] init data 08-06 16:39:31.788417 3377 8380 D UAH-UahAdaptHelper: adaptSetNotification identity = OplusUAwareInputHelpersrc = 1000 , type 0 ,p1 = -1 ,p2 = -1 ,p3 = -1 ,p4 = 08-06 16:39:31.788445 3377 8380 I [UAH_CLIENT]: uahRuleCtl, ruleId:1000, status:0 08-06 16:39:31.788622 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] mIsFoldOpen = false 08-06 16:39:31.788640 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] mScreenHeight = 2780 08-06 16:39:31.788648 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] mScreenWidth = 1264 08-06 16:39:31.788689 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] density = 3.5 08-06 16:39:31.788703 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_BUTTON] Config View: com.android.internal.policy.DecorView 08-06 16:39:31.788748 2044 11845 I URCC_CORE_SERVER: [urccRuleCtrl] urccRuleCtrl:1000 enable:0 08-06 16:39:31.788861 6748 6748 D OplusSystemUINavigationGestureExtImpl: mSideBarSceneRegion = SkRegion((1191,278,1265,548)) 08-06 16:39:31.788908 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_SIDE_BAR] View: com.android.internal.policy.DecorView 08-06 16:39:31.788920 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_SIDE_BAR] Motion: 0 08-06 16:39:31.788928 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_SIDE_BAR] mCheckForGestureSideBar: false 08-06 16:39:31.788946 6748 6748 D OplusSystemUINavigationGesture: [GESTURE_SIDE_BAR] mSideBarSceneRegion: Rect(1191, 278 - 1265, 548) 08-06 16:39:31.790301 6748 6748 W InputLog: ActivityExtImpl : dispatchTouch onTouchEvent not handled:MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=70005951, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=207765486 }, to:com.yxcorp.gifshow.v3.EditorActivity 08-06 16:39:31.791222 6748 6748 E Input_Track: [Input] Ends >>>>>>>>>>>>>>>> NOT HANDLED 08-06 16:39:31.791914 6748 6748 W InputLog: VRI[EditorActivity] : debugInputEventFinished event:MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=70005951, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=207765486 }, sEvent=DebugEvent [ type=2, action=0, downTime=70005951, eventTime=70005951, stateRecord=[2025-08-06 16:39:31.786|START_EVENT, 2025-08-06 16:39:31.787|ENQUEUE_EVENT|true|false, 2025-08-06 16:39:31.788|EarlyPostImeInputStage|0x0, 2025-08-06 16:39:31.788|NativePostImeInputStage|0x0, 2025-08-06 16:39:31.791|ViewPostImeInputStage|0x0, 2025-08-06 16:39:31.791|SyntheticInputStage|0x10, 2025-08-06 16:39:31.791|FINISH_EVENT|0x10], handleDetail=|mView handled=false ] 08-06 16:39:31.800535 3377 3535 V GameManagerServiceExt-GameManagerTouchAppHelper: onTouchAppChanged pkg is com.kuaishou.nebula 08-06 16:39:31.801195 3377 3535 D ActivityTaskManager: NFW_setLastResumedActivityUncheckLocked:false r:ActivityRecord{163921489 u0 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity t721} currentFocus:Window{8e331d8 u0 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity} 08-06 16:39:31.801408 3377 8150 D GameManagerServiceExt-GameManagerServiceExt: not game mode and touch app is com.kuaishou.nebula 08-06 16:39:31.803709 2117 2117 I OplusRequestedLayerState: setFlags sequence=58157, flags[0x00000001], mask[0x00000041], newFlags[0x00000000], name=Sprite#58157 08-06 16:39:31.806892 2117 2117 D Sharpness: Sharpness hitApplication featureId = 5, featureValues = 2, mProcessName = com.kuaishou.nebula 08-06 16:39:31.807555 1847 2293 I oplus-gfx-unify: OplusColorUnify::setDisplayColorFeatureValue():41 AIDL CALL:configure!!! 5 08-06 16:39:31.807587 1847 2293 I oplus-gfx-stc: StcOplus::setStcFeatureValue():1002 stc feature id = 5, feature_status = 2 08-06 16:39:31.807826 3120 3120 E OplusTouchDaemon: [prevent][curved_large_handle_V2][3008]: id:1 pos:1 center_down:1 (3488 11299)(0 0 0 0) 08-06 16:39:31.807856 3120 3120 E OplusTouchDaemon: [touchEvent][ts_report_touch_data][643]: first touch point id 1 [3488 11299 0 0 0 0 0] 08-06 16:39:31.807910 2117 2512 I Sharpness: handleSharpness: 0x00001000 08-06 16:39:31.808575 3377 5470 V UnwantedInteractionBlocker: notifyMotion - id=36f9faef eventTime=70005974819000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x0, action=POINTER_DOWN(1), actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, xCursorPosition=nan, yCursorPosition=nan, downTime=70005951185000 08-06 16:39:31.808608 3377 5470 V UnwantedInteractionBlocker: Pointer 0: id=0, toolType=FINGER, x=1027.618652, y=841.069763, pressure=1.000000, size=0.027451, touchMajor=0.499971, touchMinor=0.899948, toolMajor=0.499971, toolMinor=0.899948, orientation=0.000000 08-06 16:39:31.808625 3377 5470 V UnwantedInteractionBlocker: Pointer 1: id=1, toolType=FINGER, x=348.772400, y=1129.859375, pressure=1.000000, size=0.025490, touchMajor=0.499971, touchMinor=0.799954, toolMajor=0.499971, toolMinor=0.799954, orientation=0.000000 08-06 16:39:31.809384 2117 9218 D OplusLayer: Layer() sequence=58348, name=Sprite#58348 08-06 16:39:31.809884 2117 9218 D OplusLayer: Layer() sequence=58349, name=[BBQ] Sprite#58348#58349 08-06 16:39:31.810107 3377 5468 V InputDispatcher: dispatchMotion - eventTime=70005974819000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x62000000, action=POINTER_DOWN(1), actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0,edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, downTime=70005951185000 08-06 16:39:31.810331 1847 2293 D pfaca_s : mPanelChaplinBE->ProcessModeRenderIntent 08-06 16:39:31.810400 1847 2293 D pfaca_s : -- P_3_AB781_dsc_cmd_mode_panel:gamut:1,intent:1-->1, mode:0, hidl-mode:-1, sNeedUpdate:0, HDR:0, 08-06 16:39:31.810421 1847 2293 E SDM : ColorManager::UpdateModeHwassets: fod color set3ddata func is null! 08-06 16:39:31.810259 3377 3535 D BufferQueueConsumer: [](id:d31000003b1,api:0,p:-1,c:3377) connect: controlledByApp=false 08-06 16:39:31.811018 3377 5468 V system_server: addOrUpdateWindow in windows: set 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity firstDownTimeInTarget to 70005974819000 flags=FOREGROUND | SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.811092 3377 5468 V system_server: addOrUpdateWindow in windows: set [Gesture Monitor] OplusExInputReceiver1 firstDownTimeInTarget to 70005974819000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.811122 3377 5468 V system_server: addOrUpdateWindow in windows: set [Gesture Monitor] OplusUAHInputChannel firstDownTimeInTarget to 70005974819000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.811571 2117 9218 D SurfaceFlinger: getMaxAcquiredBufferCount 2, 120.000008 08-06 16:39:31.811733 3377 5468 I InputDispatcher: Publishing 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity seq=1768222, Pointers = 0: (1027.6, 841.1) 1: (348.8, 1129.9) action=POINTER_DOWN(1) downTime=70005951185000 eventTime= 70005974819000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 08-06 16:39:31.811938 6748 6748 W InputLog: VRI[EditorActivity] : debugInputEventStart event=MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=70005974, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=692101357 } 08-06 16:39:31.812234 3377 3535 D BufferQueueConsumer: [[BBQ] Sprite#58348#585(BLAST Consumer)585](id:d31000003b1,api:0,p:-1,c:3377) setMaxAcquiredBufferCount: 2 08-06 16:39:31.812265 6748 6748 D VRI[EditorActivity]: handleWindowFocusChanged mWindowFocusChanged false mUpcomingWindowFocus true mAdded true 08-06 16:39:31.812587 3377 3535 D BufferQueueProducer: [[BBQ] Sprite#58348#585(BLAST Consumer)585](id:d31000003b1,api:2,p:3377,c:3377) connect: api=2 producerControlledByApp=true 08-06 16:39:31.813293 6748 6748 W InputLog: VRI[EditorActivity] : debugInputEventFinished event:MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=70005974, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=692101357 }, sEvent=DebugEvent [ type=2, action=2, downTime=70005951, eventTime=70005974, stateRecord=[2025-08-06 16:39:31.811|START_EVENT, 2025-08-06 16:39:31.812|ENQUEUE_EVENT|true|false, 2025-08-06 16:39:31.812|EarlyPostImeInputStage|0x0, 2025-08-06 16:39:31.812|NativePostImeInputStage|0x0, 2025-08-06 16:39:31.813|ViewPostImeInputStage|0x0, 2025-08-06 16:39:31.813|SyntheticInputStage|0x10, 2025-08-06 16:39:31.813|FINISH_EVENT|0x10], handleDetail=|mView handled=false ] 08-06 16:39:31.814002 6748 6748 D VRI[EditorActivity]: handleWindowFocusChanged mWindowFocusChanged false mUpcomingWindowFocus true mAdded true 08-06 16:39:31.814086 6748 6748 E Input_Track: [Input] Start <<<<<<<<<<<<<< 922352367 08-06 16:39:31.814397 6748 6748 D OplusViewDragTouchViewHelper: dispatchTouchView action = 5 08-06 16:39:31.814615 6748 6748 E Input_Track: [Input] Ends >>>>>>>>>>>>>>>> NOT HANDLED 08-06 16:39:31.814825 3377 8118 D OMP_Detector: D:Two pointers not active, skip! 08-06 16:39:31.814864 3377 8118 D OMP_Detector: D:done mCurrStatus: 0 08-06 16:39:31.816423 3120 3120 E OplusTouchDaemon: [prevent][curved_large_handle_V2][3008]: id:2 pos:1 center_down:1 (6619 8790)(0 0 0 0) 08-06 16:39:31.816456 3120 3120 E OplusTouchDaemon: [touchEvent][ts_report_touch_data][643]: first touch point id 2 [6619 8790 0 0 0 0 0] 08-06 16:39:31.817189 3377 5470 V UnwantedInteractionBlocker: notifyMotion - id=133ebe56 eventTime=70005982840000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x0, action=POINTER_DOWN(2), actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, xCursorPosition=nan, yCursorPosition=nan, downTime=70005951185000 08-06 16:39:31.817205 3377 5470 V UnwantedInteractionBlocker: Pointer 0: id=0, toolType=FINGER, x=1027.618652, y=841.069763, pressure=1.000000, size=0.025490, touchMajor=0.499971, touchMinor=0.799954, toolMajor=0.499971, toolMinor=0.799954, orientation=0.000000 08-06 16:39:31.817211 3377 5470 V UnwantedInteractionBlocker: Pointer 1: id=1, toolType=FINGER, x=348.772400, y=1129.859375, pressure=1.000000, size=0.023529, touchMajor=0.499971, touchMinor=0.699960, toolMajor=0.499971, toolMinor=0.699960, orientation=0.000000 08-06 16:39:31.817216 3377 5470 V UnwantedInteractionBlocker: Pointer 2: id=2, toolType=FINGER, x=661.847656, y=878.968384, pressure=1.000000, size=0.029412, touchMajor=0.499971, touchMinor=0.999942, toolMajor=0.499971, toolMinor=0.999942, orientation=0.000000 08-06 16:39:31.817995 3377 5468 V InputDispatcher: dispatchMotion - eventTime=70005982840000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x62000000, action=POINTER_DOWN(2), actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0,edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, downTime=70005951185000 08-06 16:39:31.818062 3377 5468 V system_server: addOrUpdateWindow in windows: set 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity firstDownTimeInTarget to 70005982840000 flags=FOREGROUND | SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.818077 3377 5468 V system_server: addOrUpdateWindow in windows: set [Gesture Monitor] OplusExInputReceiver1 firstDownTimeInTarget to 70005982840000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.818084 3377 5468 V system_server: addOrUpdateWindow in windows: set [Gesture Monitor] OplusUAHInputChannel firstDownTimeInTarget to 70005982840000 flags=SPLIT dispatchMode=0 deviceid=6 08-06 16:39:31.818215 3377 5468 I InputDispatcher: Publishing 8e331d8 com.kuaishou.nebula/com.yxcorp.gifshow.v3.EditorActivity seq=1768230, Pointers = 0: (1027.6, 841.1) 1: (348.8, 1129.9) 2: (661.8, 879.0) action=POINTER_DOWN(2) downTime=70005951185000 eventTime= 70005982840000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 08-06 16:39:31.818357 6748 6748 D VRI[EditorActivity]: handleWindowFocusChanged mWindowFocusChanged false mUpcomingWindowFocus true mAdded true 08-06 16:39:31.818752 6748 6748 D VRI[EditorActivity]: handleWindowFocusChanged mWindowFocusChanged false mUpcomingWindowFocus true mAdded true 08-06 16:39:31.818789 6748 6748 E Input_Track: [Input] Start <<<<<<<<<<<<<< 322879062 08-06 16:39:31.818877 6748 6748 D OplusViewDragTouchViewHelper: dispatchTouchView action = 5 08-06 16:39:31.818948 6748 6748 E Input_Track: [Input] Ends >>>>>>>>>>>>>>>> NOT HANDLED 08-06 16:39:31.820077 2117 2117 I OplusRequestedLayerState: setFlags sequence=58349, flags[0x00000000], mask[0x00000100], newFlags[0x00000100], name=[BBQ] Sprite#58348#58349 08-06 16:39:31.825378 3377 3535 D BLASTBufferQueue: [[BBQ] Sprite#58348#585](f:0,a:1) acquireNextBufferLocked size=84x84 mFrameNumber=1 applyTransaction=true mTimestamp=70005993356314(auto) mPendingTransactions.size=0 graphicBufferId=14504104565837 transform=0 08-06 16:39:31.826028 2117 9580 D OplusLayer: Layer() sequence=58350, name=Sprite#58350 08-06 16:39:31.826751 2117 9580 D OplusLayer: Layer() sequence=58351, name=[BBQ] Sprite#58350#58351 08-06 16:39:31.827011 3377 3535 D BufferQueueConsumer: [](id:d31000003b2,api:0,p:-1,c:3377) connect: controlledByApp=false 08-06 16:39:31.827148 2117 9580 D SurfaceFlinger: getMaxAcquiredBufferCount 2, 120.000008 08-06 16:39:31.827227 3377 3535 D BufferQueueConsumer: [[BBQ] Sprite#58350#586(BLAST Consumer)586](id:d31000003b2,api:0,p:-1,c:3377) setMaxAcquiredBufferCount: 2 08-06 16:39:31.827537 3377 3535 D BufferQueueProducer: [[BBQ] Sprite#58350#586(BLAST Consumer)586](id:d31000003b2,api:2,p:3377,c:3377) connect: api=2 producerControlledByApp=true 08-06 16:39:31.828114 3377 8118 W InputLog: OMG_ThreeStrategy : onThreeFingers------- , reason=0, mCurrStatus=0 event = MotionEvent { action=ACTION_POINTER_DOWN(2), actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, id[1]=1, x[1]=348.77246, y[1]=1129.8594, toolType[1]=TOOL_TYPE_FINGER, id[2]=2, x[2]=661.84766, y[2]=878.96875, toolType[2]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=3, historySize=0, eventTime=70005982, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=322879062 } 08-06 16:39:31.828293 3377 8118 D OMG_ThreeStrategy: getLastMotionPointers mLastDownMotion=MotionEvent { action=ACTION_POINTER_DOWN(2), actionButton=0, id[0]=0, x[0]=1027.6191, y[0]=841.06934, toolType[0]=TOOL_TYPE_FINGER, id[1]=1, x[1]=348.77246, y[1]=1129.8594, toolType[1]=TOOL_TYPE_FINGER, id[2]=2, x[2]=661.84766, y[2]=878.96875, toolType[2]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=3, historySize=0, eventTime=70005982, downTime=70005951, deviceId=6, source=0x1002, displayId=0, eventId=322879062 } 08-06 16:39:31.829340 3377 8118 D OMG_ThreeStrategy: onMultiFingers mFirstPointY = 841 08-06 16:39:31.829537 3377 8118 D OMG_ThreeStrategy: scWidth=1264scHeight=2780 orient =1, raw:1027.6191-841.06934|348.77246-1129.8594|661.84766-878.96875 maxDistanceSquare =544232.5 08-06 16:39:31.829549 3377 8118 D OMG_ThreeStrategy: D:checkThreeDistanceRange = true 08-06 16:39:31.829858 3377 8118 D OMG_ThreeStrategy: preThreeSwipeAndStay: isTouchPadEvent = false 08-06 16:39:31.829908 3377 8118 D OMG_ThreeStrategy: size = 0.025490198 08-06 16:39:31.829914 3377 8118 D OMG_ThreeStrategy: size = 0.023529414 08-06 16:39:31.829919 3377 8118 D OMG_ThreeStrategy: size = 0.029411767 08-06 16:39:31.829950 3377 8118 D OMP_Detector: D:done mCurrStatus: 4 08-06 16:39:31.830013 3377 3535 D BLASTBufferQueue: [[BBQ] Sprite#58350#586](f:0,a:1) acquireNextBufferLocked size=84x84 mFrameNumber=1 applyTransaction=true mTimestamp=70005998462199(auto) mPendingTransactions.size=0 graphicBufferId=14504104565838 transform=0 08-06 16:39:31.830764 3377 8120 D OIM_Policy: pilferPointers, caller=3377 解释
08-12
内容概要:本文介绍了ENVI Deep Learning V1.0的操作教程,重点讲解了如何利用ENVI软件进行深度学习模型的训练与应用,以实现遥感图像中特定目标(如集装箱)的自动提取。教程涵盖了从数据准备、标签图像创建、模型初始化与训练,到执行分类及结果优化的完整流程,并介绍了精度评价与通过ENVI Modeler实现一键化建模的方法。系统基于TensorFlow框架,采用ENVINet5(U-Net变体)架构,支持通过点、线、面ROI或分类图生成标签数据,适用于多/高光谱影像的单一类别特征提取。; 适合人群:具备遥感图像处理基础,熟悉ENVI软件操作,从事地理信息、测绘、环境监测等相关领域的技术人员或研究人员,尤其是希望将深度学习技术应用于遥感目标识别的初学者与实践者。; 使用场景及目标:①在遥感影像中自动识别和提取特定地物目标(如车辆、建筑、道路、集装箱等);②掌握ENVI环境下深度学习模型的训练流程与关键参数设置(如Patch Size、Epochs、Class Weight等);③通过模型调优与结果反馈提升分类精度,实现高效自动化信息提取。; 阅读建议:建议结合实际遥感项目边学边练,重点关注标签数据制作、模型参数配置与结果后处理环节,充分利用ENVI Modeler进行自动化建模与参数优化,同时注意软硬件环境(特别是NVIDIA GPU)的配置要求以保障训练效率。
内容概要:本文系统阐述了企业新闻发稿在生成式引擎优化(GEO)时代下的全渠道策略与效果评估体系,涵盖当前企业传播面临的预算、资源、内容与效果评估四大挑战,并深入分析2025年新闻发稿行业五大趋势,包括AI驱动的智能化转型、精准化传播、首发内容价值提升、内容资产化及数据可视化。文章重点解析央媒、地方官媒、综合门户和自媒体四类媒体资源的特性、传播优势与发稿策略,提出基于内容适配性、时间节奏、话题设计的策略制定方法,并构建涵盖品牌价值、销售转化与GEO优化的多维评估框架。此外,结合“传声港”工具实操指南,提供AI智能投放、效果监测、自媒体管理与舆情应对的全流程解决方案,并针对科技、消费、B2B、区域品牌四大行业推出定制化发稿方案。; 适合人群:企业市场/公关负责人、品牌传播管理者、数字营销从业者及中小企业决策者,具备一定媒体传播经验并希望提升发稿效率与ROI的专业人士。; 使用场景及目标:①制定科学的新闻发稿策略,实现从“流量思维”向“价值思维”转型;②构建央媒定调、门户扩散、自媒体互动的立体化传播矩阵;③利用AI工具实现精准投放与GEO优化,提升品牌在AI搜索中的权威性与可见性;④通过数据驱动评估体系量化品牌影响力与销售转化效果。; 阅读建议:建议结合文中提供的实操清单、案例分析与工具指南进行系统学习,重点关注媒体适配性策略与GEO评估指标,在实际发稿中分阶段试点“AI+全渠道”组合策略,并定期复盘优化,以实现品牌传播的长期复利效应。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值