Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@zeedhi/zd-face-detection
Advanced tools
Readme
Instalação | Uso Básico | Propriedades |
O componente zd-face-detection
pode ser usado para fazer detecção da presença de um rosto na câmera.
Para instalar o pacote basta rodar o seguinte comando:
npm i @zeedhi/zd-face-detection
Com isso, dois pacotes serão instalados: o @zeedhi/zd-face-detection-common e o @zeedhi/zd-face-detection-vue.
Após a instalação, é necessário que você importe o pacote @zeedhi/zd-face-detection-vue dentro de seu arquivo de configuração zeedhi.ts
import { ZdFaceDetection } from '@zeedhi/zd-face-detection-vue';
Vue.component('ZdFaceDetection', ZdFaceDetection);
Já o pacote @zeedhi/zd-face-detection-common deve ser importado no arquivo controller do componente.
Para usar, defina a propriedade component como 'ZdFaceDetection'.
{
"name": "face-detection-example",
"component": "ZdFaceDetection"
}
Nome | Tipo | Default | Descrição |
---|---|---|---|
cameraPaused | boolean | false | Define se a câmera está ou não pausada. |
video | HTMLVideoElement | Elemento de vídeo que renderiza a imagem da câmera. | |
context | CanvasRenderingContext2D | Contexto 2D extraído do canvas. | |
canvas | HTMLCanvasElement | Elemento canvas que está sobreposto ao vídeo. | |
drawRect | boolean | true | Define se o retângulo deve ser desenhado sobre o vídeo. |
setupDetectionApi | (() => void) | Função que sobrescreve a configuração da API de detecção de rosto. | |
drawFunction | ((data: any, canvas: HTMLCanvasElement) => void) | Função para desenhar formas sobre o vídeo a partir dos dados de detecção. |
Nome | Parâmetros | description |
---|---|---|
onDetect | { data: any, element: Element, component: FaceDetection }: IEventParam | Evento disparado ao detectar um rosto na câmera. |
onCameraPause | { video: HTMLVideoElement, element: Element, component: FaceDetection }: IEventParam | Evento disparado ao pausar a câmera. |
onCameraUnpause | { video: HTMLVideoElement, element: Element, component: FaceDetection }: IEventParam | Evento disparado ao despausar a câmera. |
Nome | Parâmetros | Retorno | description |
---|---|---|---|
getFrameBase64 | { x?: number, y?: number, width?: number, height?: number }: IFaceCoordinates | string | Retorna a imagem em base64 a partir das coordenadas passadas. Caso não sejam passadas coordenadas, ele retornará a imagem inteira. |
FAQs
Powered by Zeedhi
The npm package @zeedhi/zd-face-detection receives a total of 3 weekly downloads. As such, @zeedhi/zd-face-detection popularity was classified as not popular.
We found that @zeedhi/zd-face-detection demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.